9.46 OPG_APIS.IMP_VERTEX_TAB_STATS

Format

OPG_APIS.IMP_VERTEX_TAB_STATS(
     graph_name    IN VARCHAR2,
     stattab       IN VARCHAR2,
     statid        IN VARCHAR2 DEFAULT NULL,
     cascade       IN BOOLEAN DEFAULT TRUE,
     statown       IN VARCHAR2 DEFAULT NULL,
     no_invalidate  BOOLEAN DEFAULT FALSE,  
     force              BOOLEAN DEFAULT FALSE,
     stat_category IN VARCHAR2 DEFAULT 'OBJECT_STATS');

Description

Retrieves statistics for the given property graph vertex table (VT$) from the user statistics table identified by stattab and stores them in the dictionary. If cascade is TRUE, all index statistics associated with the specified table are also imported.

Parameters

graph_name

Name of the property graph.

stattab

Name of the statistics table.

statid

Optional identifier to associate with these statistics within stattab.

cascade

If TRUE, column and index statistics are exported.

statown

Schema containing stattab.

no_invalidate

If TRUE, does not invalidate the dependent cursors. If FALSE, invalidates the dependent cursors immediately. If DBMS_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 the statistics are locked.

stat_category

Specifies what statistics to export, using a comma to separate values. The supported values are 'OBJECT_STATS' (the default: table statistics, column statistics, and index statistics) and ‘SYNOPSES' (auxiliary statistics created when statistics are incrementally maintained).

Usage Notes

(None.)

Examples

The following example creates a statistics table, exports into this table the vertex table statistics, issues a query to count the relevant rows for the newly created statistics, and finally imports the statistics back.

EXECUTE OPG_APIS.CREATE_STAT_TABLE('mystat',null);

EXECUTE OPG_APIS.EXP_VERTEX_TAB_STATS('mypg', 'mystat', 'vertex_stats_id_1', true, null, 'OBJECT_STATS');

SELECT count(1) FROM mystat WHERE statid='VERTEX_STATS_ID_1';

       108

EXECUTE OPG_APIS.IMP_VERTEX_TAB_STATS('mypg', 'mystat', 'vertex_stats_id_1', true, null, false, true, 'OBJECT_STATS');