Re: CBO rows estimate way out in 2 table join - what to do?




Hi Stephen,

Have you tried *not* using histograms? If you know you always want a
certain access path because you know your data (business data as
Jonathan refers to it in the book you reference), histograms (as
calculated by oracle) could be "messing" you up.

Can you post the execution plan?

HTH,

Steve

Yea, I started off with no column stats at all on the instance. Then
I added "method_opt all columns size 1" to get column stats on. That
still gave me no luck. I know the data is pretty skewed, so I tried
histogram which got Oracle estimating about 12K rows instead of 7K,
but its still some way from the 70M rows it should be guessing!

I will post the explain plan tomorrow (away from office now).

Should of mentioned its Oracle 9.2.0.7.

Thanks,

Stephen.

.



Relevant Pages

  • Re: Oracle ignoring function-based index - why?
    ... >I've seen oracle recommend using auto sample size. ... >histograms than this value if fine. ... Oracle suggests using "AUTO". ...
    (comp.databases.oracle.misc)
  • Re: Why index Scan in this case ?
    ... > analyze table t compute statistics for table for all tables for all ... > Whey you tried with histograms it pick the full table scan. ... > Oracle knows the distinct no of columns - Index Stats ...
    (comp.databases.oracle.server)
  • Re: Oracle CBO / Performance Issue !!!
    ... The app is quite complex and we have experienced some ... oracle back end performance issues. ... go check the histograms of columns that are ... no histograms is created on columns and CBO will automatically ...
    (comp.databases.oracle.server)
  • Re: DBMS_STATS
    ... Don't confuse Table Level statistics (implicitly including certain ... Column Level statistics) and Histograms. ... These would update Oracle with information on: ... Thus it is the last set of information that Oracle uses to identify ...
    (comp.databases.oracle.server)
  • Re: Advice on a weird query plan
    ... for the case of character-based histograms. ... just the first six BYTES of the character string, ... Oracle works. ...
    (comp.databases.oracle.server)