I am using SQl Sever 2008 and I need to optimize my queries. For this, I am using Database Engine Tuning Advisor.
My question is, can I check the performance of only one SQL query at a time or more than one using new session?
-
2possible duplicate of Sql Query Optimizationmarc_s– marc_s2011-02-14 12:58:23 +00:00Commented Feb 14, 2011 at 12:58
-
You should only be tuning one query at a time. If all of your queries need tuning, there is something very wrong. I would suspect you don't have any indexes at all or you are using bad techniques such as correlated subqueries or views that call other views. If you don't have indexes start with indexing your foreign keys and then look at what you use in the where clauses.HLGEM– HLGEM2011-02-14 15:26:31 +00:00Commented Feb 14, 2011 at 15:26
-
@ HLGEM :I have added indexe for each table... So no need to worry about that..Sachin Patil– Sachin Patil2011-02-15 04:39:04 +00:00Commented Feb 15, 2011 at 4:39
Add a comment
|
1 Answer
If you want to check the performance of your queries, as you state in your post, your best bet is to bring up SQL Profiler and examine the query statistics it reports. The Tuning Advisor can suggest things you can try, to improve performance. SQL Profiler will show you actual query performance statistics. Profiler can be invaluable in showing you exactly what's happening on your SQL Server and with your queries.
1 Comment
HLGEM
And don;t forget to check the execution plans.