Hi All,
I have a table with an index. It contains column a to
column m. There are two queries that often run :
Query 1: select * from tb where a = '01' and b = '51'
Query 2: select * from tb where a = '01' and
b = '51' and c = 'yy' and d = 'zz'
If I must create only one index and (a+b) may
contains duplicate values. Which ones of the
following index parameters is better for the
two queries above ? :
Parameter1: column a, column b
Parameter2: column a, column b, column c, column d
If (a+b) is unique, which ones should I choose ?
Could anyone help me
Thanks in advance
Anita Hery
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
I have a table with an index. It contains column a to
column m. There are two queries that often run :
Query 1: select * from tb where a = '01' and b = '51'
Query 2: select * from tb where a = '01' and
b = '51' and c = 'yy' and d = 'zz'
If I must create only one index and (a+b) may
contains duplicate values. Which ones of the
following index parameters is better for the
two queries above ? :
Parameter1: column a, column b
Parameter2: column a, column b, column c, column d
If (a+b) is unique, which ones should I choose ?
Could anyone help me
Thanks in advance
Anita Hery
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Comment