SEM_APIS.CREATE_INDEX_ON_SPM_TAB
Format
SEM_APIS.create_index_on_spm_tab (
index_name IN VARCHAR2,
spm_type IN NUMBER,
spm_name IN VARCHAR2,
model_name IN VARCHAR2,
key_string IN VARCHAR2 DEFAULT NULL,
tablespace_name IN DBMS_ID DEFAULT NULL,
degree IN NUMBER DEFAULT NULL,
prefix_length IN NUMBER DEFAULT NULL,
options IN VARCHAR2 DEFAULT NULL,
network_owner IN DBMS_ID DEFAULT NULL,
network_name IN VARCHAR2 DEFAULT NULL);
Note: This subprogram will be deprecated in a future release. It is recommended that you use the SEM_APIS.CREATE_INDEX_ON_RESULT_TAB subprogram instead.
Description
Creates a unique or a nonunique B-tree index on Subject-Predicate Matrix table.
Parameters
index_name
Name of the index.
spm_type
Type of the SPM table.
The value can be one of the following:
-
SEM_APIS.SPM_TYPE_SVP -
SEM_APIS.SPM_TYPE_MVP -
SEM_APIS.SPM_TYPE_PCN
spm_name
String for use as part of the name of the SPM table. If the target is an MVP table, then specify the name of the property.
model_name
Name of the RDF model.
key_string
The index key is a sequence whose elements are columns included in the target SPM table. It uses an ordinal number based on an ordering, starting from 1, of the properties in the SPM table structure. The subject (or START_NODE_ID) is in the zeroth position. To include the subject (that is, the START_NODE_ID column), use S.
To include the object or named graph for the n-th property, use nP or nG, respectively. Thus, 2P and 2G would refer to the columns storing the object id and named graph id of the second property in the SPM table, respectively.
If the subject or a property has in-line lexical values, then they are referred using the format <n><component-code>, where n=0 for the subject. Thus, 0VP and 2VT, for example, would refer to the S_VNAME_PREFIX and <2nd_property>_VALUE_TYPE columns in the SPM table, respectively.
tablespace_name
Destination tablespace for the index.
degree
Degree of parallelism to use.
prefix_length
Number of leading index key columns to be compressed.
options
Reserved for future use.
network_owner
Owner of the RDF network. (See Table: network_owner and network_name Parameters.)
network_name
Name of the RDF network. (See Table: network_owner and network_name Parameters.)
Usage Notes
Examples
The following example creates the index name_idx on the SVP table FLHF defined on model M1. The key_string parameter, ‘2P 1P S’, indicates that the key should be the (numeric id) value from the column corresponding to the second property in the table, followed by that from the first property in the table, followed by the subject (that is, the START_NODE_ID column). See Example: Creating a Secondary (B+-tree) Index on a Result Table for more details.
BEGIN
SEM_APIS.CREATE_INDEX_ON_SPM_TAB(
index_name. => 'name_idx'
, spm_type => SEM_APIS.SPM_TYPE_SVP
, spm_name => 'FLHF'
, model_name => 'M1'
, key_string => ' 2P 1P S '
, network_owner => 'RDFUSER'
, network_name => 'NET1'
);
END;
/