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: select value within an interval

Re: select value within an interval

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 18 Apr 2006 14:41:34 -0700
Message-ID: <1145396492.629141@yasure.drizzle.com>


Vladimir.Usov_at_gmail.com wrote:
> I used histograms to let Oracle know the data distributions in the
> indexed columns.
>
> Yes, CBO thinks it is less costly to do full scan. I know that data are
> mostly evenly distributed. How can I make Oracle choose Index Range
> Scan. I did not find any hints. I am not sure if tweaking of
> index_cost_adj parameter will help. It will make Oracle do Index FFS.
> The same huge number of consistent gets.
> The only index available is on low_range, high_range columns.

Why do you want to tell the optimizer to do what will cost more?

You can not force Oracle to perform an Index Range Scan. What you can do is force Oracle to take a pathway in which it will choose to use one.

But it all seems like you are spending a great deal of time trying to intentionally create inefficient SQL.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Tue Apr 18 2006 - 16:41:34 CDT

Original text of this message

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