Skip Headers
Oracle® Database PL/SQL Packages and Types Reference
11g Release 1 (11.1)

B28419-03
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

157 DBMS_XMLINDEX

The DBMS_XMLINDEX package provides an interface to implement asychronous indexing .

See Also:

Oracle XML DB Developer's Guide for more information about "XMLIndex"

This chapter contains the following topics:


Using DBMS_XMLINDEX


Overview

Asynchronous Index Maintenance

The basic XMLIndex is maintained on every DML operation. However, given the computing costs, in many cases the availability of stale result is adequate. In such situations, it is desirable to defer index updates to a convenient time, for example to a time when the load on the database is low. Thus a mechanism for asynchronous index maintenance is provided.


Summary of DBMS_XMLINDEX Subprograms

This table list the package subprograms in alphabetical order.

Table 157-1 DBMS_XMLINDEX Package Subprograms

Subprogram Description

CREATEDATEINDEX Procedure

Creates a secondary index for date values in the VALUE column of a PATH TABLE which is the storage table of an XMLIndex

CREATENUMBERINDEX Procedure

Creates a secondary index for number values in the VALUE column of a PATH TABLE which is the storage table of an XMLIndex

SYNCINDEX Procedure

Synchronizes the index manually



CREATEDATEINDEX Procedure

This procedure creates a secondary index for date values in the VALUE column of a PATH TABLE which is the storage table of an XMLIndex. The second form of the procedure allows for the date_index_clause to be set to an empty string.

Syntax

DBMS_XMLINDEX.CREATEDATEINDEX  (
   xml_index_schema   IN   VARCHAR2,
   xml_index_name     IN   VARCHAR2,
   date_index_name    IN   VARCHAR2,
   xmltypename        IN   VARCHAR2,
   date_index_clause  IN   VARCHAR2);

DBMS_XMLINDEX.CREATEDATEINDEX  (
   xml_index_schema   IN   VARCHAR2
   xml_index_name     IN   VARCHAR2,
   date_index_name    IN   VARCHAR2,
   xmltypename        IN   VARCHAR2);

Parameters

Table 157-2 CREATEDATEINDEX Procedure Parameters

Parameter Description

xml_index_schema

Name of the owner of the XMLIndex

xml_index_name

Name of the XMLIndex

date_index_name

Name of the secondary index to be created for date values in the VALUE column of the PATH TABLE of XMLIndex named xml_index_name and owned by xml_index_schema

xmltypename

The type to which values in the VALUE column of the path table are to be cast. Acceptable values are the following strings: DATETIME, TIME, DATE, GDAY, GMONTH, GYEAR, GYEARMONTH, GMONTHDAY.

date_index_clause

Storage clause to be applied to the date index during its creation. This is a string argument appended to the CREATE INDEX statement for creating the date index



CREATENUMBERINDEX Procedure

This procedure creates a secondary index for number values in the VALUE column of a PATH TABLE which is the storage table of an XMLIndex.

Syntax

DBMS_XMLINDEX.CREATENUMBERINDEX (
   xml_index_schema   IN   VARCHAR2,
   xml_index_name     IN   VARCHAR2,
   num_index_name     IN   VARCHAR2,
   num_index_clause   IN   VARCHAR2,
   xmltypename        IN   VARCHAR2);

Parameters

Table 157-3 CREATENUMBERINDEX Procedure Parameters

Parameter Description

xml_index_schema

Name of the owner of the XMLIndex

xml_index_name

Name of the XMLIndex

num_index_name

Name of the secondary index to be created for number values in the VALUE column of the PATH TABLE of XMLIndex named xml_index_name and owned by xml_index_schema

num_index_clause

Storage clause to be applied to the number index during its creation. This is a string argument appended to the CREATE INDEX statement for creating the number index.

xmltypename

The type to which values in the VALUE column of the path table are to be cast. Acceptable values are the following strings: FLOAT, DOUBLE, DECIMAL, INTEGER, NONPOSITIVEINTEGER, NEGATIVEINTEGER, LONG, INT, SHORT, BYTE, NONNEGATIVEINTEGER, UNSIGNEDLONG, UNSIGNEDINT, UNSIGNEDSHORT, UNSIGNEDBYTE, POSITIVEINTEGER.



SYNCINDEX Procedure

This function synchronizes an asynchronously maintained XMLIndex. It applies to the XMLIndex changes that are logged in the pending table, and brings the path table up-to-date with the base XMLTYPE column.

Syntax

DBMS_XMLINDEX.SYNCINDEX (
   xml_index_schema      IN VARCHAR2,
   xml_index_name        IN VARCHAR2);

Parameters

Table 157-4 SYNCINDEX Procedure Parameters

Parameter Description

xml_index_schema

Name of the owner of the XMLIndex

xml_schema_name

Name of the XMLIndex


Examples

EXEC DBMS_XMLINDEX.SYNCINDEX('USER1', 'SS_TAB_XMLI');