RE: Why is it better to have a composite key with the largest cardinality 1st?

2003-07-10 Thread Rudy Metzger
Vance Pattishall [mailto:[EMAIL PROTECTED] Sent: donderdag 10 juli 2003 3:05 To: [EMAIL PROTECTED] Subject: Why is it better to have a composite key with the largest cardinality 1st? Say I have column A with 1 distinct values column B and C with 2 distinct values and for simplicity sake the

Why is it better to have a composite key with the largest cardinality 1st?

2003-07-09 Thread Dathan Vance Pattishall
Say I have column A with 1 distinct values column B and C with 2 distinct values and for simplicity sake the column type is an int. If I wanted a composite key why should I make the order of the key A,B,C I read someplace that faster lookups happen with the leftmost index, being an index wit