very slow query

  • Fal (8/3/2011)


    Out of left field and most likely not related, but has anything changed on the OS/network side?

    I've previously had a mysterious inexplicable slowdown only to discover a disk defrag running. On another occasion a heavy network load caused a delay in results being returned even though the query execution itself was snappy.

    I suspect you'll find your answer internal to SQL Server, but I mention external factors in case they get overlooked or need ruling out.

    Steve.

    Weirded I've heard is a screensaver that ate 100% of the cpu. They only figured it once once going IN the server room and moving the mouse :hehe:.

    I'd say back to this issue but the OP is very quiet ATM.

  • Looks like OP has lost interest in his issue...

    May be it was caused by something absolutely unrelated to SQLServer? May be he did not hit execute button? May be he has smoked something and 1 millisecond was too slow for him? May be...? May be...? May be...?

    Who knows? 😀

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • The other possibility that's just occurred to me is a large file copy. Those things tend to trash memory and disk IO. Can kill even the simplest query.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Ninja's_RGR'us (8/3/2011)


    Fal (8/3/2011)


    Out of left field and most likely not related, but has anything changed on the OS/network side?

    I've previously had a mysterious inexplicable slowdown only to discover a disk defrag running. On another occasion a heavy network load caused a delay in results being returned even though the query execution itself was snappy.

    I suspect you'll find your answer internal to SQL Server, but I mention external factors in case they get overlooked or need ruling out.

    Steve.

    Weirded I've heard is a screensaver that ate 100% of the cpu. They only figured it once once going IN the server room and moving the mouse :hehe:.

    I'd say back to this issue but the OP is very quiet ATM.

    Gee, that rings a bell. It isn't an Urban Legend, is it?

    But OP is quiet so maybe it was transitory.

    Steve.

  • I am very sorry for the late reply

    I have found the reason...

    Problem is with Index and I rebuild the index and it worked fine...

  • Lucky9 (8/3/2011)


    I am very sorry for the late reply

    I have found the reason...

    Problem is with Index and I rebuild the index and it worked fine...

    I'd bet a lot that the problem was with the stats which was also solved by rebuilding the index.

    Check this out if it matches your case : http://sqlinthewild.co.za/index.php/2011/03/22/statistics-row-estimations-and-the-ascending-date-column

  • Ninja's_RGR'us (8/3/2011)


    Lucky9 (8/3/2011)


    I am very sorry for the late reply

    I have found the reason...

    Problem is with Index and I rebuild the index and it worked fine...

    I'd bet a lot that the problem was with the stats which was also solved by rebuilding the index.

    Statistics will NOT cause anything like this when the predicate is an equality against a column that is enforced unique.

    Either the scenario that the OP described doesn't match reality or there's something else going on (including the possibility of a disabled index)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • oops :sick:

    Thanks for the correction :-P.

Viewing 8 posts - 16 through 22 (of 22 total)

You must be logged in to reply to this topic. Login to reply