Foreign Key Index question

Hi, Let's say you have a Client table and a Staff table with a relationship table ClientStaff that has a foreign key to Client and a foreign key to Staff with a uniqueness constraint on Client, Staff. Meaning a client can have multiple staff associated but never the same staff more than once and vice versa. The question is would it be beneficial to have indexes on the Client and the Staff foreign keys in the ClientStaff table or do you think the index created by the uniqueness constraint is enough? Queries will be along the lines of SELECT * FROM Clients c JOIN ClientStaff cs ON = cs.Client JOIN Staff s ON = cs.Staff


Yes the foreign key should have a supporting index starting with the column.

No, you don't need additional index(es) on the ClientStaff table. The Client and Staff values will not be looked up there, only back in their original tables.

The Client table needs an index on, and the Staff table on, but I'm virtually certain you already have those in place.

Excellent design by the way! Most people just mistakenly slap an identity column on these "intersection" tables, and that's awful, it's much better to use the natural keys combined, as you're doing here.

Thanks for the responses!.