Re: Is it safe to switch off cost based optimizing?

From: Mark Vandenbroeck <mvandenb_at_be.oracle.com>
Date: 30 Jan 1995 08:55:08 GMT
Message-ID: <3gi9hc$fvh_at_dcsun4.us.oracle.com>


output_at_netcom.com (Output Services) wrote:

>

> Our primary use of Oracle is to extract several million records at a
> time from a set of tables, where extraction order is critical.
>
> Using the "order by" clause usually causes Oracle to do a full table
> sort, even if an index exists to generate the correct extraction order.
> So, in order to get correct extraction order, I over constrain the
> query with bogus "where" clauses until explain plan decides to use
> the index I want (which gives the correct extraction order).
>
> We are currently using the cost based optimizer, but would like to switch
> to rule based. Will switching strategies alter the execution plan for
> extraction (and screw up the extraction order)?
>
> We have NEVER run an analyze against any table.
>
> We are on Oracle 7.0.15.
>
> Any insight would be greatly appreciated.
>
> Marty (output_at_netcom.com)

If you never did an ANALYZE against any table, you are using the *RULE* based optimizer. Oracle uses the cost based optimizer only when at least one of the tables has been analyzed.

Mark Received on Mon Jan 30 1995 - 09:55:08 CET

Original text of this message