Copyright © Cloud Software Group, Inc. All Rights Reserved |
A secondary index must be deleted before it can be rebuilt. You can explicitly delete a secondary index using the TIBCO Object Service Broker supplied SIXDELETE tool or the Table Definer option from the administrator’s workbench.
• If you are doing massive insertions or deletions to a table, the data pages could split or merge, even though the secondary index pointer is not updated. If it is not updated, the index is flagged as having invalid page pointers and the primary key value is used to search the occurrences instead. Because this causes unnecessary reads of data you should rebuild an index if you did a large number of updates into a table.
• If the secondary index build failed, for example because a numeric field contained null data, you must rebuild the index. A lowercase s or lowercase q in the KEY field of the table definition indicates that an index is unusable.
• If you unload the data and definition of a table from a source system and load the definition and data into a target system, the secondary index information is not retained. You must rebuild the secondary index in the target system.Task A Delete a Secondary IndexYou can use the SIXDELETE tool from within a rule to delete secondary indexes for TDS tables. If the table type is TDS, you also have the option of using the Table Definer from the administrator’s workbench.To use the SIXDELETE tool, execute it from a rule by specifying:
Name of the table from where the secondary index is being deleted A call must be made to SIXDELETE for each field that is having the secondary index deleted. The following example deletes a secondary index from the LNAME field in the @EMPLOYEE2 table:
1. On the administrator’s workbench, position the cursor beside the DT Define Table option and press Enter. A list of tables similar to the following appears.
2. Type the line command X beside the required table and press Enter.
3. A list of fields for that table appears. The following shows an example of the display for the @EMPLOYEE2 table.
4. Type the line command D next to fields that you are deleting as secondary index fields and press Enter. The secondary key specification for the fields is deleted from the table definition. If the field is part of a composite primary key, the Q displayed in the table definition is changed to P.The reasons you are rebuilding the secondary index determine the actions that you take. Use the following table to determine the appropriate action:
Unloaded data and definition from a source system. Load the definition and data onto the target system. Task C Rebuild the index
Copyright © Cloud Software Group, Inc. All Rights Reserved |