Calls

PROCEDURE DBMS_STATS.PREPARE_COLUMN_VALUES[_NVARCHAR | _ROWID] (srec IN OUT STATREC, values IN values_type [,rwmin IN ROWID, rwmax IN ROWID]); [,rwmin IN ROWID, rwmax IN ROWID]);

STATREC is a record type with the following structure:

(epc NUMBER,
minval RAW(2000),
maxval RAW(2000),
bkvals NUMARRAY,
novals NUMARRAY)

srec holds the number of values in values in the epc column of the record and the number of occurences of each of the values in bkvals. values can support values_types of CHARARRAY, DATEARRAY, NUMARRAY, or RAWARRAY for the corresponding value types. For PREPARE_COLUMNS_NVARCHAR, use the first set of rw parameters. For PREPARE_COLUMNS_ROWID, use the second set of rw parameters.

PROCEDURE DBMS_STATS.SET_COLUMN_STATS (ownname IN VARCHAR2, tabname IN VARCHAR2, colname IN VARCHAR2, partname IN VARCHAR2 DEFAULT NULL, stattab IN VARCHAR2 DEFAULT NULL, statid IN VARCHAR2 DEFAULT NULL, distcnt IN NUMBER DEFAULT NULL, density IN NUMBER DEFAULT NULL, nullcnt IN NUMBER DEFAULT NULL, srec IN STATREC DEFAULT NULL, avgclen IN NUMBER DEFAULT NULL, [flags IN NUMBER DEFAULT NULL,] statown IN VARCHAR2 DEFAULT NULL [, no_invalidate IN BOOLEAN DEFAULT FALSE]#);

This version is used for standard statistics. Sets statistics for ownname.tabname.colname in partition partname in statown.stattab with optional identifier statid. (If stattab is NULL, statistics are stored in the dictionary.) Sets the density, number of nulls (nullcnt), and average length for column (avgclen). If no_invalidate ...

Get Oracle in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.