index [message #19559] |
Thu, 28 March 2002 02:50 |
jaffer
Messages: 1 Registered: March 2002
|
Junior Member |
|
|
if there are 5 fields in a table
and i create index with 3 fields
whether it is necessary to use all the 3 fields in hte where condition to use the index i created
|
|
|
Re: index [message #19560 is a reply to message #19559] |
Thu, 28 March 2002 04:19 |
John R
Messages: 156 Registered: March 2000
|
Senior Member |
|
|
In Oracle 8i and earlier, as long as you use the first fields in the index, the index will be used.
Eg:
Your index is on columns Col_1, Col_2 and Col_3, in that order.
A query specifying Col_1 and Col_2 will use the index.
A query specifying Col_1 and Col_3 will use the index, but only for the value of Col_1
A query specifying Col_2 and Col_3 will be unable to use the index.
|
|
|