15.33 SEM_APIS.CREATE_INDEX_ON_RESULT_TAB
Format
SEM_APIS.create_index_on_result_tab ( index_name IN VARCHAR2, query_pattern_type IN NUMBER, result_tab_name IN VARCHAR2, rdf_graph_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);
Description
Creates a unique or a nonunique B-tree index on a result table.
Parameters
- index_name
-
Name of the index.
- query_pattern_type
-
Type of the result table.
The value can be one of the following:SEM_APIS.SPM_TYPE_SVP
SEM_APIS.SPM_TYPE_MVP
SEM_APIS.SPM_TYPE_PCN
- result_tab_name
-
String for use as part of the name of the result table. If the target is an MVP table, then specify the name of the property.
- rdf_graph_name
-
Name of the RDF graph.
- key_string
-
The index key is a sequence whose elements are columns included in the target result table. It uses an ordinal number based on an ordering, starting from
1
, of the properties in the result table structure. The subject (orSTART_NODE_ID
) is in the zeroth position. To include the subject (that is, theSTART_NODE_ID
column), useS
.To include the object or named graph for the
n-th
property, usenP
ornG
, respectively. Thus,2P
and2G
would refer to the columns storing the object id and named graph id of the second property in the result table, respectively.If the subject or a property has in-line lexical values, then they are referred using the format
<n>
<component-code>
, wheren=0
for the subject. Thus,0VP
and2VT
, for example, would refer to theS_VNAME_PREFIX
and<2nd_property>_VALUE_TYPE
columns in the result 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 1-2.)
- network_name
-
Name of the RDF network. (See Table 1-2.)
Usage Notes
Examples
The following example creates the index name_idx
on the
result table FLHF
defined on the RDF graph 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 1-103 for more details.
BEGIN SEM_APIS.CREATE_INDEX_ON_RESULT_TAB( index_name => ‘name_idx’ , query_pattern_type => SEM_APIS.SPM_TYPE_SVP , result_tab_name => 'FLHF' , rdf_graph_name => 'M1' , key_string => ' 2P 1P S ' , network_owner => 'RDFUSER' , network_name => 'NET1' ); END; /
Parent topic: SEM_APIS Package Subprograms