Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 index name

Author  Topic 

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2010-03-29 : 12:00:12
Hi,

I need to check which index is used for a specific Query in Stored Procedure during Execution..what properties to be set on for this..

For instance

create procedure p
as
begin set nocount on

T-sql statement -1

T-Sql statement-2

set nocount off
end


I need to check statment -2 index ..

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-03-29 : 12:02:00
execute procedure with show actual execution plan option selected

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2010-03-29 : 12:04:33
Do you say to on click show Actual Execution Plan in SSMS GUI?
quote:
Originally posted by visakh16

execute procedure with show actual execution plan option selected

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/



Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-03-29 : 12:07:37
yup and execute sp and it will give you graphical execution plan which you can analyse and understand indexes used per query

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2010-03-29 : 12:13:41
Whether there is no any option like set show index on /off
like that?
quote:
Originally posted by visakh16

yup and execute sp and it will give you graphical execution plan which you can analyse and understand indexes used per query

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/



Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-03-29 : 12:17:33
I'm not aware of anything like that

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -