Re: Hint cardinality for predicate

  • From: Ilia Kantor <iliakan@xxxxxxxxx>
  • To: Greg Rahn <greg@xxxxxxxxxxxxxxxxxx>
  • Date: Thu, 13 May 2010 10:05:05 +0400

Hello,

Generaly I have single-table multi-condition select with several plans
possible, one involves "NOSORT" scan and filtering,
another ones have 2 indices to choose.

The problem is that incorrect estimation leads to NOSORT scanning
where it would be better to use another plan and back.
My own estimations usually lead to correct plan if I provide them in
OPT_ESTIMATE(..,TABLE,..rows=).

But that'd be much better if I could pass not "calculated total
selectivity (rows)" for table, but selectivity of every predicate.


2010/5/13 Greg Rahn <greg@xxxxxxxxxxxxxxxxxx>:
> Can you provide more context for your issue? (and example with plan
> estimates and actuals would be a start)?
> Cardinality estimates being off isn't necessarily an issue, if it
> still yields the desired plan, so what plan do you get and what plan
> do you want?
>
> Have you tried different levels of dynamic sampling?
>
> On Wed, May 12, 2010 at 12:53 PM, Ilia Kantor <iliakan@xxxxxxxxx> wrote:
>> I have a multi-predicate query like:
>>
>> SELECT * FROM table WHERE
>> a BETWEEN 5 and 10
>> and
>> b in (3,4,5)
>> and c in (9)
>> ...
>
>
> --
> Regards,
> Greg Rahn
> http://structureddata.org
>
--
//www.freelists.org/webpage/oracle-l


Other related posts: