<remove-index>
The <remove-index> element defines the name of a database index that you want to remove from the data model. It is valid for use with the following data model elements:
<entity><extension>
You can use this element to safely remove a non-primary key index if it is one of the following:
- non-unique
- unique and contains an
IDcolumn
Guidewire performs metadata validation to ensure that the <remove-index> element removes only those indexes that fall into one of these categories.
false.See Overriding data type attributes
for an example of using a nested <columnParam> subelement
within a <column-override> element to set an attribute on
a column. Use the same pattern to set the createSpatialIndex
parameter to false and to remove a spatial point index for an
extension entity. See also <columnParam> subelement for a description of
the createSpatialIndex parameter.
The index is non-unique
You can safely remove a non-primary key index with the unique attribute set to false. In general, these are indexes that Guidewire provides for performance enhancement. It is safe to remove these kinds of indexes.
The index is unique and contains an ID column
You can safely remove a non-primary key index with the unique attribute set to true if that index also includes ID as a key column. An ID column is already unique by itself, and so a multicolumn index that includes the ID column does not enforce a uniqueness condition. Thus, it is safe to remove these kinds of indexes.
For example, the WorkItem entity contains the following index definition:
<index desc="Covering index to speed up checking-out of work items and they involve search on status"
name="WorkItemIndex2" unique="true">
<indexcol keyposition="1" name="status"/>
<indexcol keyposition="2" name="Priority" sortascending="false"/>
<indexcol keyposition="3" name="CreationTime"/>
<indexcol keyposition="4" name="ID"/>
</index>
Although the unique attribute is set to true, you can safely remove this index because the index definition
contains an ID column; in this example, keyposition="4".
Attributes of <remove-index>
The <remove-index> element contains the following attributes.
|
Description |
Default |
|---|---|---|
|
Name of the index to remove. The index name is defined by the |
None |
Modifying an index
In many cases, you want to modify an existing database index. In that case, use the <remove-index> element to
remove the index, and then add a new index with the same name that contains the desired characteristics.
