Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: The Cost Based Optimizer drives me crazy...

Re: The Cost Based Optimizer drives me crazy...

From: MarkP28665 <markp28665_at_aol.com>
Date: 1997/09/08
Message-ID: <19970908220201.SAA00681@ladder01.news.aol.com>#1/1

Esmé Venter >>
This statement (an example) makes use of the index on column1:

        Select * from table A where column1='xxxx' This statement does NOT make use of the index on column1:

        Insert into table B (select * from table A where column1='xxxx') Why would this happen? <<

Check the statistics and counts for the two tables in question. If the number of rows in all_tables is not close to the actual count then update the statistics: analyze owner.table_name estimate statistics sample nnnnn rows; (command only works properly for 7.1.6 and up) then redo the explain plans.

If table b is small it may be quicker to sequentially read the table rather than use the index!

Mark Powell -- The only advise that counts is the advise that you follow so follow your own advise Received on Mon Sep 08 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US