Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 90
  • Last Modified:

Query - which index being used?

When doing a query on a table with multiple indexes how can i know which one SQL is using?
0
Jess31
Asked:
Jess31
1 Solution
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
You need to include the Query Execution Plan. This will give you all the information about your query.
0
 
Scott PletcherSenior DBACommented:
You don't even have to actually run the query to get an estimated query plan.

Select/highlight the text for the query, then right-click and select "Display Estimated Execution Plan".  That will tell you want indexes are being used, and the number of rows that SQL estimates will come from each operation.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now