Solved

Query - which index being used?

Posted on 2016-09-22
2
36 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 45

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:ScottPletcher
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this article I will describe the Backup & Restore 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.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

706 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

21 Experts available now in Live!

Get 1:1 Help Now