Improving implementation of procedures and functions

 

These coding techniques help reduce the processing time of a function or procedure.

The following tips are especially important for functions because a function tends to be called multiple times from many different procedures:

Coding techniques used for the SQL routine body can have a major impact on the runtime performance of the generated C program. By writing your routine to allow greater use of C code for assignments and comparisons, the overhead of an equivalent SQL statement is avoided. The following tips should help your routine generate more C code and fewer SQL statements.

 

Parent topic:

Improving performance of procedures and functions