RE: Manipulate DATE histograms
- From: Wolfgang Breitling <breitliw@xxxxxxxxxxxxx>
- To: makulev@xxxxxxx
- Date: Thu, 14 Dec 2006 15:30:25 -0700
Your example must be from Oracle 10. If you try to use any value > 3
for flags in Oracle 9 you get an error
ORA-20001: Invalid or inconsistent input values
ORA-06512: at "SYS.DBMS_STATS", line 3628
ORA-06512: at line 12
I don't know what the additional binary 100 means in Oracle 10. I
couldn't find a difference between using flags=2 and flags=6, even in
the trace.
At 02:39 PM 12/14/2006, Milen Kulev wrote:
... And for avgclen and flags parameters of SET_COLUMN_STATS the
documentation
(http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_stats2.htm#1003948)
says:
Avgclen -Average length for the column (in bytes).
Flags -For internal Oracle use (should be left as NULL)
SREC.EPC := 2; DBMS_STATS.SET_COLUMN_STATS(NULL,'"DUMMY"','"D1"',
NULL ,NULL,NULL,3,.333333333333333,0,srec,8,6); <----
DATE is 8 bytes and flags is 6 and not NULL as documentation suggested ?
Just because you use NULL as an input "value" for flags doesn't mean
Oracle uses NULL, it just means "use your internal default" which
appears to be 2 for Oracle 9i and 6 for Oracle 10g.
Regards
Wolfgang Breitling
Centrex Consulting Corporation
www.centrexcc.com
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
--
http://www.freelists.org/webpage/oracle-l
- References:
- RE: Manipulate DATE histograms
- From: Milen Kulev
Other related posts:
Avgclen -Average length for the column (in bytes). Flags -For internal Oracle use (should be left as NULL)SREC.EPC := 2; DBMS_STATS.SET_COLUMN_STATS(NULL,'"DUMMY"','"D1"', NULL ,NULL,NULL,3,.333333333333333,0,srec,8,6); <----
DATE is 8 bytes and flags is 6 and not NULL as documentation suggested ?
- RE: Manipulate DATE histograms
- From: Milen Kulev