If your are usually going to be looking for data based on three pieces of data, it would be more affective to have an index comprised of all three pieces of data. If the index can tell you exactly where to find the data for those three criteria, you will have better performance. The more specific the index, the faster the data retrieval. I can't tell you how an index performs based on how many pieces of data comprise it however. Haven't played with them that much. Perhaps there's some break even point where the overall table performance suffers from a over complicated index.
Remember something important with this: the more indexes on a table the more impact on the performance of an insert. When you insert data, an entry will be made for each index. If you are doing more selecting than inserting, it would make sense to optimize the selecting with an index. But if you are doing more inserting than selecting, be conservative with your indexes to improve insert performance.
(Jeff M, please correct me if I'm leading this thread astray.)
Peter
------------------------------------------------------
Work smarter, not harder.
|