9.1 OPG_APIS.ANALYZE_PG
Format
OPG_APIS.ANALYZE_PG( graph_name IN VARCHAR2, estimate_percent IN NUMBER, method_opt IN VARCHAR2, degree IN NUMBER, cascade IN BOOLEAN, no_invalidate IN BOOLEAN, force IN BOOLEAN DEFAULT FALSE, options IN VARCHAR2 DEFAULT NULL);
Description
Hathers, for a given property graph, statistics for the VT$, GE$, IT$, and GT$ tables.
Parameters
- graph_name
-
Name of the property graph.
- estimate_percent
-
Percentage of rows to estimate in the schema tables (NULL means compute). The valid range is [0.000001,100]. Use the constant
DBMS_STATS.AUTO_SAMPLE_SIZE
to have Oracle Database determine the appropriate sample size for good statistics. This is the usual default. - mrthod_opt
-
Accepts either of the following options, or both in combination, for the internal property graph schema tables:
-
FOR ALL [INDEXED | HIDDEN] COLUMNS [size_clause]
-
FOR COLUMNS [size clause] column|attribute [size_clause] [,column|attribute [size_clause]...]
size_clause
is defined assize_clause := SIZE {integer | REPEAT | AUTO | SKEWONLY}
-
integer
: Number of histogram buckets. Must be in the range [1,254]. -
REPEAT
: Collects histograms only on the columns that already have histograms. -
AUTO
: Oracle Database determines the columns to collect histograms based on data distribution and the workload of the columns. -
SKEWONLY
: Oracle Database determines the columns to collect histograms based on the data distribution of the columns
column
is defined ascolumn := column_name | (extension)
-
column_name
: name of a column -
extension
: Can be either a column group in the format of(column_name, column_name [, ...])
or an expression.
The usual default is:
FOR ALL COLUMNS SIZE AUTO
-
- degree
-
Degree of parallelism for the property graph schema tables. The usual default for degree is NULL, which means use the table default value specified by the DEGREE clause in the CREATE TABLE or ALTER TABLE statement. Use the constant
DBMS_STATS.DEFAULT_DEGREE
to specify the default value based on the initialization parameters. TheAUTO_DEGREE
value determines the degree of parallelism automatically. This is either 1 (serial execution) orDEFAULT_DEGREE
(the system default value based on number of CPUs and initialization parameters) according to size of the object. - cascade
-
Gathers statistics on the indexes for the property graph schema tables. Use the constant
DBMS_STATS.AUTO_CASCADE
to have Oracle Database determine whether index statistics are to be collected or not. This is the usual default. - no_invalidate
-
If
TRUE
, does not invalidate the dependent cursors. IfFALSE
, invalidates the dependent cursors immediately. IfDBMS_STATS.AUTO_INVALIDATE
(the usual default) is in effect, Oracle Database decides when to invalidate dependent cursors. - force
-
If
TRUE
, performs the operation even if one or more underlying tables are locked. - options
-
(Reserved for future use.)
Usage Notes
Only the owner of the property graph can call this procedure.
Examples
The following example gather statistics for property graph mypg
.
EXECUTE OPG_APIS.ANALYZE_PG('mypg', estimate_percent=> 0.001, method_opt=>'FOR ALL COLUMNS SIZE AUTO', degree=>4, cascade=>true, no_invalidate=>false, force=>true, options=>NULL);
Parent topic: OPG_APIS Package Subprograms