Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sanjnep
Posting Yak Master
191 Posts |
Posted - 2006-05-15 : 14:26:59
|
| I have table InfoTech and columns hid int, name varchar (20),address (30), age int, ssn varchar (12). and it contains about 100,000 rowsI need to make query:1. select * from InfoTech where name = @value12. select * from InfoTech where name = @value1 and address = @value22. Select * from InfoTech where name = @value1 and address = @value2 and age = @value3I have already created clustered index on hid. Should I create covering (composite) index on (name, address ,age) or should I create separate indexes on each column (name, address ,age)? Please suggest.ThanksSanjeev |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-05-15 : 15:03:11
|
| I'd suggest the composite index as all 3 queries can use it.Tara Kizeraka tduggan |
 |
|
|
|
|
|