question

skbarik avatar image
skbarik asked

Query retrieving getting slow

I have 12 tables in one of my database.While retrieving all this using JOIN my query getting slower than expectation. As of yesterday it was going good.Then I checked my statistics,blocking,deadlock,fragmentation level all are up to date and there is no problem at all.What may be causes?What should I do now ?
sql-server-2008performance
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Magnus Ahlkvist avatar image
Magnus Ahlkvist answered
When you say "slower than expectation" it could mean anything from another millisecond to another minute execution time... Have you looked at the query plan for the slow query? If you look at the Estimated plan or the Actual plan in Sql Server Management Studio, you'll probably at least get a hint about which parts of the query plan are the slowest. You'll also get a hint about possibly missing indexes (though SSMS' hints about missing indexes are not always the best, so don't just apply new indexes per SSMS' suggestion). To provice more help, you'll need to provide more information about your database. DDL, metrics, indexes etc.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.