set nocount ongoUSE [tempdb]GO-- create a table with two columnsCREATE TABLE [dbo].[MyTest]( [i] [int] IDENTITY(1,1) NOT NULL, [j] [char](8000) NULL) GO-- inserting 10000 rowsINSERT INTO dbo.MyTest (j) VALUES ('A')GO 10000 -- this is another cool feature to run a batch in loop-- below is to get the plan without running the querySET SHOWPLAN_XML ONGOSELECT * FROM MyTest WHERE I = 5GOSET SHOWPLAN_XML OFF
Once you run above code and look at results in grid mode, you will see a hyperlink as below.
Clicking on hyperlink would open another windows in SSMS as shown below.
Hope this helps to someone in the world.
As always, comments are welcome.
this is really good post, handy sql command to get the missing indexes
I know and I love it!
In SQL Server 2005 it was not easy to get the same information, but doable. See my blog post about the subject http://www.lybecker.com/blog/2008/12/01/easy-win-index-candidates-on-sql-server-2005/
Thanks for the comment. You are absolutley correct that this can be done in SQL 2005 also but as my blog says "human readable format" :)
This is great stuff. one can direct look on what index is required in run time