Re: Hint cardinality for predicate

  • From: Ilia Kantor <iliakan@xxxxxxxxx>
  • To: Marcin Przepiorowski <pioro1@xxxxxxxxx>
  • Date: Thu, 13 May 2010 00:08:04 +0400

Hello,

Database version is 11g2.

I tried histograms. But the problem here again is that columns are
kind-of intercorrelated.

For example, I have 1 column named "country", then other columns have
different stats for each country.
So in fact I need count(distinct country) statistic sets for proper estimation.

I tried partitioning by country, but it has drawbacks in my case which
slow down at other places.

Best regards
Ilya


2010/5/12 Marcin Przepiorowski <pioro1@xxxxxxxxx>:
> On Wed, May 12, 2010 at 8:53 PM, Ilia Kantor <iliakan@xxxxxxxxx> wrote:
>> Hello,
>>
>> 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)
>> ...
>>
>> Unfortunately, optimizer is not very good at estimating cardinalities.
>> Columns are somewhat intercorrelated and "multiple column stats"
>> feature does not fix that.
>>
>> Although, I gather my own stats which give me exact idea for
>> selectivity of each predicate.
>> How can I pass this information to optimizer?
>>
>
> Hi,
>
> What database version ?
> Did you try change gathering statistic from estimating to calculating
> and use histograms ?
>
>
> --
> Marcin Przepiorowski
> http://oracleprof.blogspot.com
>
--
//www.freelists.org/webpage/oracle-l


Other related posts: