Results 1 to 10 of 10

Thread: long query

  1. #1
    Join Date
    Dec 2003
    Posts
    8

    Question Unanswered: long query

    My SQL server blocking for a while
    After monitoring with SQL Profiler I found a lot of interesting situation:

    query duration is 2045607 msec (=34 min)
    CPU usage is 0 msec, number of reads is 3 and number of writes is 0

    Where could be a bottleneck ?

    Query is tooooooooo long but resorces usage seems to be OK.

    Help... SOS ....

  2. #2
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    What about locking?

  3. #3
    Join Date
    Dec 2003
    Posts
    8
    Originally posted by snail
    What about locking?
    It looks with no locks

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Post the query, please.

    blindman

  5. #5
    Join Date
    Dec 2003
    Posts
    8
    Originally posted by blindman
    Post the query, please.

    blindman
    This is one of many querys with long response

    SELECT PPKZIP ,POPZIP ,Zupanija FROM AVEZIP ORDER BY PPKZIP ASC

  6. #6
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Originally posted by valentini
    This is one of many querys with long response

    SELECT PPKZIP ,POPZIP ,Zupanija FROM AVEZIP ORDER BY PPKZIP ASC
    Nr of rows ?
    DDL of the table ?
    Any index ?

  7. #7
    Join Date
    Dec 2003
    Posts
    8
    Originally posted by fadace
    Nr of rows ?
    DDL of the table ?
    Any index ?
    Rows about 300
    Index on first field - PPKZIP
    Table with 3 fields

  8. #8
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Are you seriously saying that it is taking 34 minutes for SQL server to sort 300 rows on an indexed column?

    Are there any other processes running? Check the database activity and check the status of any scheduled jobs.

    How many users are on the system while this is happening?

  9. #9
    Join Date
    Dec 2003
    Posts
    8
    Originally posted by blindman
    Are you seriously saying that it is taking 34 minutes for SQL server to sort 300 rows on an indexed column?

    Are there any other processes running? Check the database activity and check the status of any scheduled jobs.

    How many users are on the system while this is happening?
    No scheduling jobs and no special database activity.
    As you can see CPU is not used (0 msec)
    But after 30 min SQL response with packet of data
    Possible from cached memory.

    But after 30 min ..................
    Is there maybe problem in conlfict with some other transaction
    problem with TCP/IP or with physical RAM

    ...

  10. #10
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    What happens if you run the same statement directly from Query Analyzer on the database server?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •