Reuse the function descriptor

The access method can store the function descriptor in user-data memory for use in multiple executions of the same UDR. For example, the access method stores the function descriptor so that it can repeat a WHERE-clause function on each index entry.
Important: The database server assigns a PER_COMMAND duration to the function descriptor. The access method cannot change the duration of the original function descriptor, but can store a copy of it as part of the PER_STATEMENT user data to which the table descriptor points. Any access-method purpose function can obtain the function descriptor because they all have access to the table descriptor.

If the access method uses FastPath to execute support functions, the am_open purpose function can store the function descriptor in PER_STATEMENT memory. For example, a CREATE INDEX statement causes the database server to call the am_insert purpose function iteratively. To execute the support function or functions that build an index, each iteration of am_insert can retrieve the support-function descriptor from the table descriptor.

For information about user data, see Store data in shared memory.