I told a friend of mine about this today, and to my surprise, he was amazed.
So, I told another friend and he was amazed. And he told 2 friends and they told
2 friends and so on and so on. OK, sorry for the cheesy 70's commercial
reference. I'm not trying to insult anyone's intelligence with this post, and at
the same time I don't want anyone to miss out on these SQL Server gems.
Did you know that you can run the new SQL Server 2005 database engine tuning
advisor against a query? Maybe this might give you some advice on where to place
a clustered or non-clustered indexes. If you aren't sure, you can always
implement the automated suggestion. :-)
- In SQL Server Management Studio, highlight your query..
select *
from orders
where orderdate > '12/31/1996'
and employeeid = 5
- From the Query menu, click Analyze Query in Database Engine Tuning
Advisor.
That's it! Oh, and did you also know you can do something similar in SQL Server 2000 to
run the index tuning wizard?
- In Query Analyzer, highlight your query...
- From the Query menu, click Index Tuning Wizard.
If you haven't tried these features, do it now I tell ya! :-)