Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

composite indexes

Status
Not open for further replies.

scotward

Technical User
Jan 30, 2002
24
US
If I have tables joined on two columns in each table, what is the advantage of using a compostite index as opposed to indexing each column individually?
 
There are so many factors invovled, it is nearly impossible to give an answer to the question.

Some of the factors include:

1) What is selection criteria in the where clause, if any?
2) How is the data distributed in the tables?
3) Are any of the indexes clustered?
4) Which version of SQL Server are you running?

The best way to decide is to test with various index configurations. Use the Query Analyzer to display the Estimated Query Plan. You'l be able to see which indexes are used, if any. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top