Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why CBO choose the wrong plan?
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
![]() |
![]() |