Customize access methods
The database server provides the full implementation of the generic B-tree secondary-access method, and it provides definitions for the R-tree secondary-access method. By default, the CREATE INDEX statement builds a generic B-tree index for the column or user-defined function.
When you create an opaque data type, you must ensure that secondary-access
methods exist that support the new data type. Consider the following
factors about the secondary-access methods and their support for the
opaque data type:
- Does the generic B-tree support the opaque data type?
- If the opaque-type data is spatial, can you use the R-tree index?
- Do other secondary-access methods exist that might better index your opaque-type data?
To create an index of a particular secondary-access method on a column of an opaque data type, the database server must find an operator class that is associated with the secondary-access method. This operator class must specify operations (strategy functions) on the opaque data type as well as the functions that the secondary-access method uses (support functions).
For more information about an operator class and operator-class functions, see Operator classes.