Home | Previous Page | Next Page   Design Decisions > Using FastPath >

Obtaining the Routine Identifier

You can obtain the routine identifier for a strategy function directly from the qualification descriptor that the database server passes to the access method. Call mi_qual_funcid(). Because the database server does not provide the routine identifier for a support function directly in a descriptor, use the following procedure to identify the support function for FastPath execution.

To obtain the routine identifier for a support function
  1. Use mi_tab_keydesc() to extract the key descriptor from the table descriptor.
  2. Use mi_key_opclass_nsupt() to determine the number of support functions that the access method must look up.
  3. Use mi_key_opclass_supt() to determine each support-function name and then assemble a function prototype with a statement similar to the following example:
    sprintf(prototype, "%s(%s,%s)", 
          function_name, key_data_type, key_data_type);
  4. Use DataBlade API FastPath function mi_routine_get() to look up the function descriptor.

For an example of a secondary access method that includes dynamic support-function execution, see the indexing information on the IBM Informix Developer Zone at www.ibm.com/software/data/developer/informix.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]