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

Home -> Community -> Usenet -> c.d.o.server -> Re: cost of index range scan

Re: cost of index range scan

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Mon, 15 May 2006 15:41:47 GMT
Message-Id: <pan.2006.05.15.15.41.46.200224@sbcglobal.net>


On Mon, 15 May 2006 07:09:37 -0700, jernigam_at_kochind.com wrote:

> If I just do
> select * from table_a
> where acct_date >= :b1
>
> Then I get a ix_sel of .009. I would think that this would be .05.

Your first value may have been such that it was .009. You know about the bind variable peeking? CBO takes a look in the bind variable when it parses the statement for the 1st time and that is what defines the selectivity of the index in this particular query. Personally, I hate bind variable peeking as it introduces the element of randomness: whatever you look at the beginning will determine your plan afterward. Philosophically speaking, it introduces the uncertainty principles into databases. Even if God does play dice, Larry Ellison definitely shouldn't.

-- 
http://www.mgogala.com
Received on Mon May 15 2006 - 10:41:47 CDT

Original text of this message

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