Purpose Functions, Flags, and Values
Purpose functions, methods, and flags defined the attributes of access methods.
The following table describes the
possible settings for the sysams columns that contain purpose
functions or methods, flags, and values. The entries appear in the
same order as the corresponding sysams columns.
Keyword | Explanation | Category | Default |
---|---|---|---|
am_sptype | A character that specifies from what type of storage
space a primary or secondary-access method can access data. The am_sptype character
can have any of the following settings:
Valid only for a new access method. You cannot change or add an am_sptype value with ALTER ACCESS_METHOD. Do not set am_sptype to 'D' or attempt to store a virtual table in a dbspace. |
Value | Virtual-Table Interface (C): 'A' |
am_defopclass | The default operator class for a secondary-access method. The access method must exist before you can define its operator class, so you set this value in the ALTER ACCESS_METHOD statement. | Value | None |
am_keyscan | A flag that, if set, indicates that am_getnext returns rows of index keys for a secondary-access method. If a query selects only the columns in the index key, the database server uses the row of index keys that the secondary-access method puts in shared memory, without reading the table. | Flag | Not set |
am_unique | A flag to set if a secondary-access method checks for unique keys | Flag | Not set |
am_cluster | A flag that you set if a primary- or secondary-access method supports clustering of tables | Flag | Not set |
am_rowids | A flag that you set if a primary-access method can retrieve a row from a specified address | Flag | Not set |
am_readwrite | A flag to set if a primary-access method supports
data changes. The default setting, not set, indicates that the virtual
data is read-only. For the C Virtual-Table Interface, set this flag
if your application writes data, to avoid the following problems:
|
Flag | Not set |
am_parallel | A flag that the database server sets to indicate
which purpose functions or methods can run in parallel in a primary
or secondary-access method. If set, the hexadecimal am_parallel bitmap
contains one or more of the following bit settings:
Insertions, deletions, and updates are not supported in the Java™ Virtual-Table Interface. |
Flag | Not set |
am_expr_pushdown | A flag that enables the use of parameter descriptors. | Flag | Not set |
am_costfactor | A value by which the database server multiplies the cost that the am_scancost purpose function or method returns for a primary or secondary-access method. An am_costfactor value from 0.1 to 0.9 reduces the cost to a fraction of the value that am_scancost calculates. An am_costfactor value of 1.1 or greater increases the am_scancost value. | Value | 1.0 |
am_create | A keyword that you associate with a user-defined function or method (UDR) name that creates a virtual table or virtual index | Task | None |
am_drop | A keyword that you associate with the name of a UDR that drops a virtual table or virtual index | Task | None |
am_open | A keyword that you associate with the name of a UDR that makes a fragment, extspace, or sbspace available | Task | None |
am_close | A keyword that you associate with the name of a UDR that reverses the initialization that am_open performs | Task | None |
am_insert | A keyword that you associate with the name of a UDR that inserts a row or an index entry | Task | None |
am_delete | A keyword that you associate with the name of a UDR that deletes a row or an index entry | Task | None |
am_update | A keyword that you associate with the name of a UDR that changes the values in a row or key | Task | None |
am_stats | A keyword that you associate with the name of a UDR that builds statistics based on the distribution of values in storage spaces | Task | None |
am_scancost | A keyword that you associate with the name of a UDR that calculates the cost of qualifying and retrieving data | Task | None |
am_check | A keyword that you associate with the name of a UDR that tests the physical structure of a table or performs an integrity check on an index | Task | None |
am_beginscan | A keyword that you associate with the name of a UDR that sets up a scan | Task | None |
am_endscan | A keyword that you associate with the name of a UDR that reverses the setup that am_beginscan initializes | Task | None |
am_rescan | A keyword that you associate with the name of a UDR that scans for the next item from a previous scan to complete a join or subquery | Task | None |
am_getnext | A keyword that you associate with the name of the required UDR that scans for the next item that satisfies a query | Task | None |
am_getbyid | A keyword that you associate with the name of a UDR that fetches data from a specific physical address; am_getbyid is available only for primary-access methods | Task | None |
am_truncate | A keyword that you associate with the name of a UDR that deletes all rows of a virtual table (primary-access method) or that deletes all corresponding keys in a virtual index (secondary-access method) | Task | None |
The following rules apply to the purpose-option specifications
in the CREATE ACCESS_METHOD and ALTER ACCESS_METHOD statements:
- To specify multiple purpose options in one statement, separate them with commas.
- The CREATE ACCESS_METHOD statement must specify a user-defined
function or method name that corresponds to the am_getnext keyword.
The ALTER ACCESS_METHOD statement cannot drop the function or method name that corresponds to am_getnext but can modify it.
- The ALTER ACCESS_METHOD statement cannot add, drop, or modify the am_sptype value.
- You can specify the am_defopclass value only with the ALTER
ACCESS_METHOD statement.
You must first register a secondary-access method with the CREATE ACCESS_METHOD statement before you can assign a default operator class.