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: Why CBO choose the wrong plan?

Re: Why CBO choose the wrong plan?

From: wblxx <wangbinlxx_at_gmail.com>
Date: Sun, 01 Jul 2007 22:50:11 -0700
Message-ID: <1183355411.752590.179540@j4g2000prf.googlegroups.com>


Hi Jonathan,

The original query is
select sum(TBL_FIN_ACC_STAT_SUMM.AMOUNT) from TBL_ACC_STAT_SUMM TBL_FIN_ACC_STAT_SUMM where ACCOUNT_ID = 156800 and
TBL_FIN_ACC_STAT_SUMM.SETTLED_DT BETWEEN to_date('20070601','yyyymmdd') AND to_date('20070602','yyyymmdd');

I guess this is an example, as you point out in your book, Oracle uses partition-level statistics with a single-known partition, while uses table-level statistics with a multiple-known partitions. I cannot tell what's wrong with table statistics yet.

Thanks,
Bin Received on Mon Jul 02 2007 - 00:50:11 CDT

Original text of this message

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