Introduction to NonStop SQL/MP
What Happens When a Query Is Submitted
NonStop SQL Architecture
3–10 113425 Tandem Computers Incorporated
Figure 3-4. Components of NonStop SQL/MP
012
Low-Level System
Components:
SQL File System
Data Access
Manager
Disk Files
SQL
Optimizer
Object Program
Containing
Static SQL
SQL
Compiler
Source Program
Containing
Static SQL
Language
Compiler
Dynamic SQL
SQL
Executor
Object Program File,
Compiled SQL
Query Plans,
Static SQL Source
Compiled
Dynamic
SQL
User
Application
Data
Dictionary
The SQL Compiler and SQL
Optimizer
When you embed static SQL statements in a program, the language compiler
transforms the host-language source code into a compiled object program. (You can
also bind program modules at this stage.)
As shown in Figure 3-4, the next step is SQL compilation. Using the object program as
its source, the SQL compiler transforms the embedded SQL statements into executable
query plans. The SQL compiler creates an object program file containing the host-
language object program, the compiled SQL query plans, and the SQL source
statements.
SQL Statements Designed for Multiple Execution
Because the compiled query plans and SQL source statements are stored in the object
program file, they are easy to access at run time. Several benefits result when you
make both the compiled plans and source statements available to the SQL executor.