The CREATE FUNCTION statement identifies a function as
part of a database, but not necessarily as part of an access method.
To register the access method, issue the CREATE SECONDARY ACCESS_METHOD
statement, which sets values in the sysams system catalog table.
The CREATE SECONDARY ACCESS_METHOD statement sets values
in the sysams system catalog table, such as:
The unique name of each purpose function
A storage-type (extspaces or sbspaces) indicator
Flags that activate optional features, such as writable data or
clustering
The sample statement in the following figure assigns registered
function names to some purpose functions. It specifies that the access
method should use sbspaces and it enables clustering.Figure 1: Statement
that assigns registered function names to some purpose functions
The statement in Statement
that assigns registered function names to some purpose functions does
not name a purpose function for am_stats, am_scancost,
or am_check, or set the am_keyscan or am_unique flag,
as the 0 values in Register a secondary access method indicate. The database
server sets a 0 value for am_parallel because
none of the CREATE FUNCTION statements for the purpose functions included
the PARALLELIZATION routine modifier.
Important: Even
if you supply and register a purpose function with the CREATE FUNCTION
statement, the database server assumes that a purpose function does
not exist if the purpose-function name in the sysams system
catalog table is missing or misspelled.