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.
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.