• SQL Pizza (4/19/2013)


    At one of my servers i got the funny problem, that sometimes one of my queries take 300 ms and at some times 8000 ms allthough the server has enough ressources. I can't explain this behaviour. What could be theoretical reasons for this?

    Thanks in advance! God bless you!

    Can you provide some more details? The theoretical reasons could be just about anything. Is this a stored proc? Are the stats up to date? Do you have nonSARGable predicates? The list could go on and on. At the very least providing the actual execution plan would be a good place to start.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/