16.5 SEM_PERF.GATHER_STATS
Format
SEM_PERF.GATHER_STATS( just_on_values_table IN BOOLEAN DEFAULT FALSE, degree IN NUMBER(38) DEFAULT NULL, estimate_percent IN NUMBER DEFAULT DBMS_STATS.AUTO_SAMPLE_SIZE, value_method_opt IN VARCHAR2 DEFAULT NULL, link_method_opt IN VARCHAR2 DEFAULT NULL, network_owner IN VARCHAR2 DEFAULT NULL, network_name IN VARCHAR2 DEFAULT NULL);
Description
Gathers statistics about RDF and OWL tables and their indexes.
Parameters
- just_on_values_table
-
TRUE
collects statistics only on the table containing the lexical values of triples;FALSE
(the default) collects statistics on all major tables related to the storage of RDF and OWL data.A value of
TRUE
reduces the execution time for the procedure; and it may be sufficient if you need only to collect statistics on the values table (for example, if you use other interfaces to collect any other statistics that you might need). - degree
-
Degree of parallelism. For more information about parallel execution, see Oracle Database VLDB and Partitioning Guide.
- estimate_percent
-
Determines the percentage of rows in RDF_LINK$ and RDF_VALUE$ to sample.
The valid range is between 0.000001 and 100. You can use the constant
DBMS_STATS.AUTO_SAMPLE_SIZE
(the default) to enable Oracle Database to determine the appropriate sample size for optimal statistics. - value_method_opt
-
Accepts either of the following options, or both in combination, for the RDF_VALUE$ table:
-
FOR ALL [INDEXED | HIDDEN] COLUMNS [size_clause]
-
FOR COLUMNS [size clause] column|attribute [size_clause] [,column|attribute [size_clause]...]
size_clause
is defined as:size_clause := SIZE {integer | REPEAT | AUTO | SKEWONLY}
column
is defined as:column := column_name | (extension)
-
integer
: Number of histogram buckets. Must be in the range [1, 2048]. -
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_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 2048
-
- link_method_opt
-
Accepts either of the following options, or both in combination, for the RDF_LINK$ table:
-
FOR ALL [INDEXED | HIDDEN] COLUMNS [size_clause]
-
FOR COLUMNS [size clause] column|attribute [size_clause] [,column|attribute [size_clause]...]
size_clause
is defined as:size_clause := SIZE {integer | REPEAT | AUTO | SKEWONLY}
column
is defined as:column := column_name | (extension)
-
integer
: Number of histogram buckets. Must be in the range [1,2048]. -
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_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 FOR COLUMNS SIZE 2048 P_VALUE_ID CANON_END_NODE_ID START_NODE_ID G_ID (CANON_END_NODE_ID, START_NODE_ID) (P_VALUE_ID, CANON_END_NODE_ID) (P_VALUE_ID, START_NODE_ID)
-
- network_owner
-
Owner of the semantic network. (See Table 1-2.)
- network_name
-
Name of the semantic network. (See Table 1-2.)
Usage Notes
To use this procedure, you must connect as a user with permission to execute it. Network owners and DBAs have privileges execute this procedure.
This procedure collects statistical information that can help you to improve inferencing performance, as explained in Enhancing Inference Performance. This procedure internally calls the DBMS_STATS.GATHER_TABLE_STATS procedure to collect statistics on RDF- and OWL-related tables and their indexes, and stores the statistics in the Oracle Database data dictionary. For information about using the DBMS_STATS package, see Oracle Database PL/SQL Packages and Types Reference.
Gathering statistics uses significant system resources, so execute this procedure when it cannot adversely affect essential applications and operations.
See also Managing Statistics for Semantic Models and the Semantic Network.
Examples
The following example gathers statistics about RDF and OWL related tables and their indexes.
EXECUTE SEM_PERF.GATHER_STATS(network_owner=>'RDFUSER', network_name=>'NET1');
Parent topic: SEM_PERF Package Subprograms