In Adaptive Server, all query plans are submitted to the procedural execution engine. The procedural execution engine drives execution of the query plan by:
Directly executing simple SQL statements such as set, while, and goto.
Calling out to the utility modules to execute create table, create index, and other utility commands.
Setting up the context for and driving the execution of stored procedures and triggers.
Setting up the execution context and calling the query execution engine to execute query plans for select, insert, delete, and update statements.
Setting up the cursor execution context for cursor open, fetch and close statements and calling the query execution engine to execute these statements.
Doing transaction processing and post execution cleanup.
To support the demands of today’s applications, a new generation of query execution techniques is required. To meet that demand, the query execution engine has been completely rewritten. With a new query execution engine and query optimizer in place, the procedural execution engine in Adaptive Server 15.0 passes all query plans generated by the new query optimizer to the query execution engine.
The query execution engine executes query plans. All query plans chosen by the optimizer are compiled into query plans. However, SQL statements that are not optimized, such as set or create, are compiled into query plans like those in versions of Adaptive Server earlier than 15.0, and are not executed by the query execution engine. Earlier query plans are either executed by the procedural execution engine or by utility modules called by the procedural engine. Adaptive Server version 15.0 has two distinct kinds of query plans and this is clearly seen in the showplan output (see Chapter 2, “Using showplan.”)