Executing in parallel
Parallelizable routines can execute in parallel across multiple processors.
Before you begin
To make a UDR parallelizable, apply the following rules:
- Follow the guidelines for well-behaved user-defined routines.
- Avoid any DataBlade® API routine that involves query processing (mi_exec(), mi_exec_prepared_statement()), collections (mi_collection_*), row types, or save sets (mi_save_set_*).
- Do not create rows that contain any complex types including another row type as one of the columns. Do not use the mi_row_create() or mi_value() functions with complex types or row types.
- Avoid DataBlade API FastPath functions (mi_routine_*, mi_func_desc_by_typeid()) if the access method might pass them routine identifiers for nonparallelizable routines.
- Specify the PARALLELIZABLE routine modifier in the CREATE FUNCTION or CREATE PROCEDURE statement for the UDR.
For more information about the following topics, see the Informix®
DataBlade API Programmer's Guide:
- Guidelines for well-behaved user-defined routines
- A complete list of nonparallelizable functions
- FastPath function syntax, usage, and examples
For more information about the PARALLELIZABLE (and other) routine modifiers, see the routine modifier section in the Informix Guide to SQL: Syntax. For more information about parallelizable UDRs, see Creating User-Defined Routines and User-Defined Types.
About this task
To make an access method parallelizable:
Procedure
Results
Important: A parallelizable
purpose function must call only routines that are also parallelizable.
All the strategy and support functions for the operator class that
the index uses must also be parallelizable.
The database server sets an am_parallel purpose value in the sysams system catalog table to indicate which access-method actions can occur in parallel.