Previous Topic: Index Key CompressionNext Topic: Multimember Relationships


Non-SQL Tuning Options

Sorted relationship considerations

When you store an entity occurrence in a sorted chained relationship, the DBMS searches the relationship in the next direction, starting with the current entity occurrence. If the new occurrence cannot be inserted in the next direction, the DBMS establishes currency on the parent entity occurrence and begins the search from this occurrence (moving in the next direction). When you store an entity occurrence in a sorted indexed relationship, the DBMS searches the occurrences starting from the top of the index structure.

Note: If the DUPLICATES FIRST option is specified for a sorted relationship and the key of the current entity of set is equal to the key of the entity to be stored, the DBMS must begin its search for the insertion point from the owner entity.

Store operations are executed most efficiently when the new entity can be inserted either at the very beginning or the very end of the relationship. If new entities are consistently stored in ascending order, you should perform one of the following procedures to ensure that insertions of new entity occurrences into the relationship will be performed efficiently:

For more information on pointers, see "Linkage" later in this chapter.

If input entities are consistently stored in descending order, perform one of the following procedures:

For further information on the DML statements used to access the database, see CA IDMS DML Reference Guide for COBOL.

Representing a sorted relationship

Represent a sorted relationship on the data structure diagram by specifying ASC or DES and the name of the sort key as part of the relationship specification.

A sorted relationship on the data structure.

There are additional tuning options available to non-SQL implementations. These are described in this chapter.