Introduction to NonStop SQL/MP
What Happens When a Query Is Submitted
NonStop SQL Architecture
113425 Tandem Computers Incorporated 3–13
The optimizer has access to current statistics, maintained in the data dictionary, about
the tables, indexes, and other SQL objects. If data descriptions change or indexes are
added or deleted, the optimizer uses the current information to choose a query plan.
The SQL Executor The SQL executor is a set of system library procedures that executes compiled SQL
statements against database tables, views, or the database catalogs. To execute an SQL
statement, the executor uses the query plan generated by the SQL optimizer.
The executor manages logical names for tables and other SQL objects. By using logical
names, programmers can write embedded SQL statements without having to know
about the physical characteristics of the database. Logical names make application
programs easier to maintain and help keep them independent of the physical database
configuration. When a statement is executed, the executor maps the logical names to
the underlying physical file names.
Managing Low-Level Components
The executor manages the low-level components of the NonStop SQL/MP system. A
complex query can consist of several individual requests, each of which contains a
single set of variables and searches a single table. For each single-table request, the
executor calls the SQL file system.
The file system, also a set of system library procedures, manages the physical schema
of the database. It opens files, indexes, and partitions, and sends requests to the
appropriate data access managers. The file system also manages updates to base
tables and their associated indexes.
The data access manager retrieves and updates data on individual disk volumes. A
separate group of data access manager processes handles each disk volume. The data
access manager performs all the selection and simple evaluation of data that can be
executed against a single disk volume. When possible, the data access manager also
performs grouping and aggregation of data.
Figure 3-6 shows the components of NonStop SQL/MP that execute a query.