Indexes [message #372544] |
Wed, 21 February 2001 09:04 |
meena
Messages: 36 Registered: December 2000
|
Member |
|
|
Suppose I have a table with columns Col1, Col2, Col3. I create a composite index on (Col1, Col2). And the following query is performed,
SELECT Col3 FROM table_name WHERE Col1 = value and Col2 = value;
How will this query be executed?
(1) Will Oracle find the the value of Col1 and then check all the rows corresponding to that Col1 for the value of Col2 specified?
OR
(2) Will it directly go to the row corresponding to the specified values of Col1 and Col2?
Thanks,
-Meena
|
|
|
|
Re: Indexes [message #372565 is a reply to message #372544] |
Fri, 23 February 2001 01:38 |
Balamurugan
Messages: 4 Registered: February 2001
|
Junior Member |
|
|
Hai,
With reference to your doubt. You have
created the composite index for col1 and col2.
It will retreive the col3 directly using col1 and col2.
With regards,
Balu
|
|
|