missing index for specific qurey or stored proc in sqlserver

Hi,

I want a query for missing index on given  specific query or sp .
if  i enter missing index DMV ,it is giving missing index information
for all the objects in the memory since server was started
that is available in BOL.

Thanks
dinesh
chandradineshbabuAsked:
Who is Participating?
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
Hope you would have used the below one for finding Missing index information

SELECT *
FROM sys.dm_db_missing_index_details

>> it is giving missing index information for all the objects in the memory since server was started

To find out only for your query or stored procedure, you can run this one

DBCC FREEPROCCACHE;
DBCC DROPCLEANBUFFERS;

Now run your query or Stored proc and then the Missing index details DMV's to get Missing index only for your query..
0
 
chandradineshbabuAuthor Commented:
it is good answer i got it
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.