If a query is performing slow , you need to check the following things
1. Indexes
Check if useful indexes are present . Take the help of Database Tuning Advisor in SQL to get index suggestions.
2. Statistics
Index and column statistics are up to date or not . If they are not , then probably , query might not perform as required . In a frequently changing database , it may happen that statistics are out of date
3. Run the query in between
SET STATISTICS PROFILE ON
SET STATISTICS IO ON
SET STATISTICS TIME ON
[ Query ]
SET STATISTICS TIME OFF
SET STATISTICS IO OFF
SET STATISTICS PROFILE OFF
Comments
Post a Comment
Hi User,
Thanks for visiting My Blog and please provide your valuable feedback and subscribe for more updates. Please don't post any spam content or comments.
Thank You