February 1, 2012 at 5:35 am
We have a table with 150000 records. It has a primary key on 3 columns and a index on 5 columns.
When a select query is executed on this table usully it takes 6 seconds to execute but some time it takes more than a 60 seconds and then 'Query Time out' message is reported.
This problem is seen intermittently.
What could be the solution for this? or What approach I should follow to derive proper solution?
February 1, 2012 at 7:05 am
Can't say exactly why that is happening (might be blocking / deadlocking involved).. If the timeouts occur repeatedly at the same time, then you might want to see if there is anything happening at that point of time on your database.
But you can definitely start tuning that query, have you looked at the execution plan and see if it can be tuned?
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
February 1, 2012 at 8:41 am
There are way too many possibilities and too few details provided to be of much help. Take a look at this article http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url].
_______________________________________________________________
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/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply