about indexes [message #19632] |
Tue, 02 April 2002 00:53 |
Nimit
Messages: 6 Registered: December 2001
|
Junior Member |
|
|
How can I know that index is used or not on query I m executing
and also
If I create index on 3 columns of one table, If I use second column out of that index, index will be used by query executer or not
????
|
|
|
Re: about indexes [message #19637 is a reply to message #19632] |
Tue, 02 April 2002 04:04 |
uma
Messages: 67 Registered: May 2001
|
Member |
|
|
Execute the plan then you will know whether indexes used or not.
EXPLAIN PLAN
SET STATEMENT_ID = 'table x plan'
INTO PLAN_TABLE
for
SELECT
a.column1,b.colm2
from table1 a, tabl2 b
where a.colm3=b.colm4
;
Hope this will help u,
Uma
|
|
|
Re: about indexes [message #19668 is a reply to message #19632] |
Wed, 03 April 2002 05:53 |
Sanjay Bajracharya
Messages: 279 Registered: October 2001 Location: Florida
|
Senior Member |
|
|
Use explain plan to see if the indexe are hit or not.
If you are using ONLY the 2nd column of an index, then it will not use the index. Try using the 1st and the 2nd column.
If you really want to use it with just the 2nd column, then create another index with just the 2nd column in it.
|
|
|