Define Db2 LUW XML Indexes
You can create a table that has one or more columns of type XML. Query execution processes each XML instance at runtime, so a mechanism for indexing XML columns is provided to speed up queries. Use the Db2 for LUW XML Index Editor to define the XML columns participating in the table XML index.
To define a Db2 LUW XML Index
- Expand a Table in the Model Explorer.
- Right-click an XML Index and select Properties.
The Db2 for LUW XML Index Editor opens.
- Select an XML Index and work with the following options:
Note: Click New
on the toolbar to create an XML index. Use the Enter filter text text box to filter a large list of names to locate the one you want to work with.
- Name
Specifies the name of the XML index.
- Schema
Specifies a schema for the selected XML index.
- Column
Specifies the column for which the XML index is being created. Select from the drop-down list. For the selected table, only those columns for which you have specified the Physical Data Type as XML appear in the drop-down list.
- Is Unique
Specifies whether or not the selected XML index is unique.
- Generate
Specifies whether or not to generate DDL for this object during Forward Engineering.
- Click the General tab and work with the following options:
- Invalid Value Action
Specifies the action you want to take when Db2 encounters invalid XML patterns. Select from the drop-down list; valid values are Ignore and Reject.
- Tablespace
Specifies the tablespace in which you want to create the index. Create or select from the drop-down list.
- Percent Free
Specifies the percentage of each index page to leave as free space when building the index.
- Level 2 Percent Free
Specifies the percentage of each index level 2 page to leave as free space when building the index.
- Minimum Percent Used
Specifies whether index leaf pages are merged online, and the threshold for the minimum percentage of space used on an index leaf page.
- Allow Index Reverse Scan
Specifies that an index can support both forward and reverse scans; that is, scanning of the index in the order that was defined at index creation time, and scanning in the opposite order.
- Page Split Type
Specifies the index split behavior. Select from the drop-down list. The valid values are symmetric, high, and low.
- Collect Statistics Type
Specifies that the index statistics have to be collected at the time of creating the index. Select from the drop-down list; valid values are Basic, Detailed, and Detailed by Sampling.
- Is Compressed
Specifies that the index uses index compression. Select from the drop-down list; valid values are True and False.
- Click the XML Pattern tab and enter the pattern expression that identifies the nodes for indexing. In the SQL Data Type section, specify the data type to which you want to convert the indexed values before they are stored.
- Click the Permission tab and grant permissions to users, user groups, and/or roles on the selected XML index.
- (Optional) Click the Commenttab and enter any comments that you want to associate with the object.
- (Optional) Click the Where Used tab to view where the object is used within the model.
- (Optional) Click the UDPtab to work with user-defined properties for the object.
- (Optional) Click the Notestab to view and edit user notes.
- (Optional) Click the Extended Notes tab to view or edit user notes.
- Click Close.
The Db2 for LUW XML Index Editor closes.
Copyright © 2020 erwin, Inc.
All rights reserved.
|
|