11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER <strong>11</strong> ■ APPLICATION DEVELOPMENT 483data, the datatype information would also be stored in this column. The VALUE column storesthe text value of the simple element node without children or attribute nodes. All comments areignored during indexing. The VALUE column truncates any value larger than 4,000 bytes since itis a VARCHAR2(4000) datatype. For incidents where the VALUE column exceeds 4,000 bytes, theLOCATOR value is updated so that the complete value can be retrieved from the base table. Inaddition to the 4,000-byte limitation of the VALUE column, <strong>Oracle</strong> imposes another limit for thesize of the key for the secondary index created on this column. This limit is determined by theDB_BLOCK_SIZE parameter of the database. This is not just for XMLIndex but also applies for B-treeand function-based indexes. It is important to note that neither the VALUE column limitation of4,000 bytes nor the index key size affects the results of the query. The only perceivable impactis on performance.Detailed conceptual information is provided for the path table. Unfortunately, you cannotaccess the path table. If you try to access the path table, you will get an error resembling this:SQL> select order_key from XDB.XDBACL_PATH_TAB;select order_key from XDB.XDBACL_PATH_TAB*ERROR at line 1:ORA-30967: operation directly on the PathTable is disallowedThe only thing you are allowed to do with the path table is create secondary indexes on thepath table columns. Besides this, you really cannot do anything else. You do not even gatherstatistic on the path table. The only object(s) you would want to gather statistics is on theXMLIndex or the base table for the XMLIndex.At index creation time, you have the option of specifying the path table name using thePATH TABLE option in the PARAMETERS clause. If you do not specify a path name, a system-generatedpath name will be created. Also, you can specify the tablespace location to the path table. Bydefault, the storage properties for the XMLIndex path table and the secondary indexes automaticallyinherit the storage properties of the base table of the XMLIndex. You can customizethe storage parameters in the PARAMETERS clause. Here’s an example of the storage options:('path table edba_po_path_table(pctfree 5 pctused 90 initrans 5storage (initial 1k next 2k minextents 3 buffer_pool keep)nologging enable row movement parallel 3)path id index edba_po_path_id_idx (logging pctfree 1 initrans 3)order key index edba_po_order_key_idx (logging pctfree 1 initrans 3)value index edba_po_value_idx (logging pctfree 1 initrans 3)');The following CREATE INDEX syntax illustrates all the XMLIndex options that have beendiscussed so far:SQL> create index edba_security_xmlindex2 on edba_security v (value(v))3 indextype is xdb.xmlindex4 parameters('path table edba_security_path_table5* (tablespace tools) async (sync manual)')SQL> /Index created.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!