Getting Started with Adobe After Effects - Part 6: Motion Blur
Ask
Ask questions, discuss or help others by answering
Related Posts · View All
SQL Server 141
TSQL 75
SSRS 70
SSIS 66
XML 54

Top Categories · View All
SQL Server 141
TSQL 75
SSRS 70
SSIS 66
XML 54

Index Problem

Aug 17 2012 12:00AM by Santosh Srivastava   

I have a problem in SQL Server.
 
There are two indexes on a table.
 
Employee Table Structure.
 
emp_code  varchar (4)
emp_name varchar (40)
emp_dept   varchar (2)
 
Indexes:-
1.  emp_code
2.  emp_code+emp_dept
 
Sql Query..
 
select emp_code,emp_name where emp_code= '0001'
 
select emp_code,emp_name where emp_dept='10'
 
How can I indentify which index are used on select statement.
 
Thanks & Regards,

Submitted under: Microsoft SQL Server · DBA · Indexes ·  · 


Santosh Srivastava
584 · 0% · 61

2 Replies

  • The most reliable way to identify the index being used is to look in the execution plan. To do that, click on the tool bar button "Include actual execution plan" in the SSMS toolbar and run your query.

    After the query is executed, SSMS will show a new tab with the execution plan of the query. You can find out the index being used from there.

    commented on Aug 17 2012 9:10AM
    Jacob Sebastian
    1 · 100% · 32002
  • In the execution plan, you can see "Index Scan" and "Index Seek" iterators, when you see the properties of that iterator, you can see index name.

    commented on Aug 18 2012 3:46AM
    Ramireddy
    2 · 41% · 12972

Your Reply


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]