Skip Headers
Oracle® Spatial and Graph RDF Semantic Graph Developer's Guide
12c Release 1 (12.1)

E17895-14
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

13 SEM_PERF Package Subprograms

The SEM_PERF package contains subprograms for examining and enhancing the performance of the Resource Description Framework (RDF) and Web Ontology Language (OWL) support in an Oracle database. To use the subprograms in this chapter, you must understand the conceptual and usage information in Chapter 1, "RDF Semantic Graph Overview" and Chapter 2, "OWL Concepts".

This chapter provides reference information about the subprograms, listed in alphabetical order.

SEM_PERF.DELETE_NETWORK_STATS

Format

SEM_PERF.DELETE_NETWORK_STATS (

     cascade_parts IN BOOLEAN DEFAULT TRUE,

     cascade_columns IN BOOLEAN DEFAULT TRUE,

     cascade_indexes IN BOOLEAN DEFAULT TRUE,

     no_invalidate IN BOOLEAN DEFAULT DBMS_STATS.AUTO_INVALIDATE,

     force IN BOOLEAN DEFAULT FALSE,

     options IN VARCHAR2 DEFAULT NULL);

Description

Deletes statistics for the semantic network.

Parameters

options

Controls the scope of the operation:

  • If MDSYS.SDO_RDF.VALUE_TABLE_ONLY, the operation applies only to the MDSYS.RDF_VALUE$ table.

  • If MDSYS.SDO_RDF.LINK_TABLE_ONLY, the operation applies only to the MDSYS.RDF_LINK$ table.

  • If null (the default), the operation applies to both the MDSYS.RDF_VALUE$ and MDSYS.RDF_LINK$ tables.

(other parameters)

See the parameter explanations for the DBMS_STATS.DELETE_TABLE_STATS procedure in Oracle Database PL/SQL Packages and Types Reference, although force here applies to network statistics.

Usage Notes

See the information about the DBMS_STATS package inOracle Database PL/SQL Packages and Types Reference.

See also Section 1.10, "Managing Statistics for Semantic Models and the Semantic Network".

Examples

The following example deletes statistics for the semantic network:

EXECUTE SEM_APIS.DELETE_NETWORK_STATS;

SEM_PERF.EXPORT_NETWORK_STATS

Format

SEM_PERF.EXPORT_NETWORK_STATS (

     stattab IN VARCHAR2,

     statid IN VARCHAR2 DEFAULT NULL,

     cascade IN BOOLEAN DEFAULT TRUE,

     statown IN VARCHAR2 DEFAULT NULL,

     stat_category IN VARCHAR2 DEFAULT 'OBJECT_STATS',

     options IN VARCHAR2 DEFAULT NULL);

Description

Exports the statistics for the semantic network and stores them in the user statistics table.

Parameters

options

Controls the scope of the operation:

  • If MDSYS.SDO_RDF.VALUE_TABLE_ONLY, the operation applies only to the MDSYS.RDF_VALUE$ table.

  • If MDSYS.SDO_RDF.LINK_TABLE_ONLY, the operation applies only to the MDSYS.RDF_LINK$ table.

  • If null (the default), the operation applies to both the MDSYS.RDF_VALUE$ and MDSYS.RDF_LINK$ tables.

(other parameters)

See the parameter explanations for the DBMS_STATS.EXPORT_TABLE_STATS procedure in Oracle Database PL/SQL Packages and Types Reference.

Usage Notes

See the information about the DBMS_STATS package inOracle Database PL/SQL Packages and Types Reference.

See also Section 1.10, "Managing Statistics for Semantic Models and the Semantic Network".

Examples

The following example exports the statistics for the semantic network and stores them in a table named STAT_TABLE.

EXECUTE SEM_APIS.EXPORT_NETWORK_STATS('stat_table');

SEM_PERF.GATHER_STATS

Format

SEM_PERF.GATHER_STATS(

     just_on_values_table IN BOOLEAN DEFAULT FALSE,

     degree IN NUMBER(38) 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.

Usage Notes

To use this procedure, you must connect as a user with permission to execute it. By default, when Spatial and Graph is installed as part of Oracle Database, only the MDSYS user can execute this procedure; however execution permission on this procedure can be granted to users as needed.

This procedure collects statistical information that can help you to improve inferencing performance, as explained in Section 2.2.7. 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 Section 1.10, "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;

SEM_PERF.IMPORT_NETWORK_STATS

Format

SEM_PERF.IMPORT_NETWORK_STATS (

     stattab IN VARCHAR2,

     statid IN VARCHAR2 DEFAULT NULL,

     cascade IN BOOLEAN DEFAULT TRUE,

     statown IN VARCHAR2 DEFAULT NULL,

     no_invalidate IN BOOLEAN DEFAULT FALSE,

     force IN BOOLEAN DEFAULT FALSE,

     stat_category IN VARCHAR2 DEFAULT 'OBJECT_STATS',

     options IN VARCHAR2 DEFAULT NULL);

Description

Retrieves the statistics for the semantic network from a user statistics table and stores them in the dictionary.

Parameters

options

Controls the scope of the operation:

  • If MDSYS.SDO_RDF.VALUE_TABLE_ONLY, the operation applies only to the MDSYS.RDF_VALUE$ table.

  • If MDSYS.SDO_RDF.LINK_TABLE_ONLY, the operation applies only to the MDSYS.RDF_LINK$ table.

  • If null (the default), the operation applies to both the MDSYS.RDF_VALUE$ and MDSYS.RDF_LINK$ tables.

(other parameters)

See the parameter explanations for the DBMS_STATS.IMPORT_TABLE_STATS procedure in Oracle Database PL/SQL Packages and Types Reference, although force here applies to network statistics.

Usage Notes

See the information about the DBMS_STATS package inOracle Database PL/SQL Packages and Types Reference.

See also Section 1.10, "Managing Statistics for Semantic Models and the Semantic Network".

Examples

The following example imports the statistics for the semantic network in a table named STAT_TABLE, and stores them in the dictionary.

EXECUTE SEM_APIS.IMPORT_NETWORK_STATS('stat_table');