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!

Redundant Index?

Status
Not open for further replies.

scotward

Technical User
Jan 30, 2002
24
US
Table 1 (1.3 million rows): Primary key is comprised of three colums (customer, date, item) and I have set this up as a clustered index. There is also a salesperson field that is not indexed (yet).

Table 2 (50,000 rows): Primary key is comprised of two columns (salesperson, customer). These are also set up as a clustered index.

I want to query table 1 and table 2, joining on salesperson and customer. To optimize performance, should I

a) Index table_1.saleseperson

OR

b) Create a composite index on table_1.salesperson and table_1.customer (it seems redundant since customer is in the primary key)

Thanks for any advice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top