Solved

Query - which index being used?

Posted on 2016-09-22
2
48 Views
Last Modified: 2016-09-22
When doing a query on a table with multiple indexes how can i know which one SQL is using?
0
Comment
Question by:Jess31
2 Comments
 
LVL 46

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 41810743
You need to include the Query Execution Plan. This will give you all the information about your query.
0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 41810983
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now