Re: Which oracle command to use to find out which index was used

From: Matt B. <mcb_at_ds.znet.com>
Date: Thu, 1 Feb 2001 19:14:01 -0800
Message-ID: <t7k9ac1k1quu8a_at_corp.supernews.com>


[Quoted] "Patrick J. Hayes" <pjh_at_ngdc.noaa.gov> wrote in message news:3A7992CF.C6043EA2_at_ngdc.noaa.gov...
> I'm testing the search speed of oracle tables using different indexes.
> What command in oracle can I type to find out which index oracle used
> for my query. I believe the optimizer looks at the tables, indexes and
> so forth before deciding the best approach to run the query. I've looked
> at Explain, analyze, and explain plan., but its not
> really what I'm after.
> Any suggestions?
>
> Patrick Hayes

As another poster said, do an alter session set SQL_TRACE=TRUE and then use [Quoted] tkprof to read the output .trc file.

Also, I believe TOAD has this functionality too - just type in your query and [Quoted] hit the iconic button that has the ambulance on it and it'll tell you.

-Matt Received on Fri Feb 02 2001 - 04:14:01 CET

Original text of this message