Enterprise Edition Home |
Express Edition Home |
Previous Page | Next Page Queries and the Query Optimizer > SQL Within SPL Routines >
When
the database server executes an SPL routine with the EXECUTE PROCEDURE statement,
with the CALL statement,
or within an SQL statement, the following
activities occur:
- The database server reads the interpreter code from the system
catalog tables and converts it from a compressed format to an executable
format. If the SPL routine is in the UDR cache,
the database server retrieves it from the cache and bypasses the
conversion step.
- The database server executes any SPL statements
that it encounters.
- When the database server encounters an SQL statement, it
retrieves the query plan from the database and executes the statement.
If the query plan has not been created, the database server optimizes
the SQL statement before it executes.
- When the database server reaches the end of the SPL routine
or when it encounters a RETURN statement,
it returns any results to the client application. Unless the RETURN statement
has a WITH RESUME clause, the SPL routine
execution is complete.
Enterprise Edition Home |
Express Edition Home |
[ Top of Page | Previous Page | Next Page | Contents |
Index ]