Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: INDEXES ? DO I have to activate it?
On 5 Jun 98 16:48:46 GMT, dolans_at_stripe.Colorado.EDU (Sean
Dolan) wrote:
>I have just created an index on a column of a table. Do I need to activate it somehow so that Oracle knows to use it? Or does it do it itself? It's on Oracle 7.3.4.
You don't have to activate it. Whether Oracle uses it or not depends on your query. If it's a single-column index, and you issue a simple:
select * from table where the_column = X
then Oracle should use the index. If you want to be really sure, then you should read up on the EXPLAIN PLAN command in the SQL Reference Manual. It's not terribly difficult to use, and with it you can find out exactly how Oracle is going to process the query.
Jonathan Received on Sun Jun 07 1998 - 12:04:37 CDT