Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Manipulate DATE histograms
Why do you think I pointed you to dbms_stats.prepare_column_values.
That's what it is there for.
create table dummy (d1 date);
DECLARE
SREC DBMS_STATS.STATREC;
NOVALS DBMS_STATS.DATEARRAY;
BEGIN
SREC.EAVS := 0; SREC.CHVALS := NULL; SREC.EPC := 3;
9.2.0.7> DECLARE
2 SREC DBMS_STATS.STATREC;
3 NOVALS DBMS_STATS.DATEARRAY;
4 BEGIN
5
6 SREC.EAVS := 0; 7 SREC.CHVALS := NULL; 8 SREC.EPC := 3;
PL/SQL procedure successfully completed.
table column NDV density nulls lo hi av lg bkts G U lastanalyzed sample
------------------------ --------------------- --------- ------------ --------- ---------------- ---------------- ----- ----- - - ---------------- --------- DUMMY D1 3 5.0000E-05 0 AD 2004-01-01 00 AD 2006-01-01 00 2 2 Y N 2006-12-14 12:42 table column EP value actual value ------------------------ --------------------- --------- ------------------------------------- ------------------------------ DUMMY D1 100 2453006 DUMMY D1 300 2453372 DUMMY D1 1300 2453737
3 rows selected.
I took it straight from the example in my paper you quoted; just
changed the arraytype to datearray.
Consider it a Christmas present:
At 12:06 PM 12/14/2006, Milen Kulev wrote:
>Hi Wolfgang ,
>I have looked at DBMS_STATS.* functions and procedures.
>I have read your paper
>http://www.centrexcc.com/Using%20DBMS_STATS%20in%20Access%20Path%20Optimization.ppt.pdf
>(Page
>30)too. What I need is an example how to format the dates to RAW
>format on order to initialize SREC.BKVALS array.
>
>Best Regards. Milen
Regards
Wolfgang Breitling
Centrex Consulting Corporation
www.centrexcc.com
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Dec 14 2006 - 13:43:29 CST
![]() |
![]() |