multi-part index and when it is used?
Say I have a phonebook table that has a multi-part index on lastname, firstname, middleInitial. If I do SELECT * FROM phonebook WHERE lastName = 'Smith', then it should use the index right? What if I do SELECT * FROM phonebook WHERE lastName LIKE 'S%' would that use the index also? If I wanted to list the whole phonebook would SELECT * FROM phonebook use the correct index if I had multiple indexes?
THe idea behind this is I heard that trying to remove ORDER BY by using indexes helps on RAM and can speed a query up potentially. Therefore, I was thinking of how to do this in scenarios like the the one give where there are some WHEREs, but not all.
Peter
Subject
Views
Written By
Posted
multi-part index and when it is used?
5124
January 12, 2005 05:05PM
2946
January 12, 2005 09:21PM
2186
January 13, 2005 07:18AM
2319
January 13, 2005 07:36AM
2125
January 13, 2005 07:39AM
2183
January 14, 2005 01:29AM
2363
January 14, 2005 10:03AM
2244
January 14, 2005 04:05PM
Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.