ODBC Server Reference Manual
Architecture Overview
HP NonStop ODBC Server Reference Manual—429151-002
2-41
NonStop SQL/MP Execution
SQLCI uses a separate SQLCI2 process for SQL statement execution, so a
NonStop SQL/MP statement can be interrupted at any time (by stopping the SQLCI2
process). Therefore, a user can issue a Cancel request at any time. The NonStop
ODBC Server partially supports a Cancel request by checking for the Cancel between
issuing NonStop SQL/MP FETCH statements. If each FETCH statement involves little
work, the client effectively has Cancel support. If each FETCH statement involves
much work (such as a large sort), the user must stop the NonStop ODBC Server to
interrupt execution.
Caching NonStop SQL/MP Compilations
To improve performance, the NonStop ODBC Server caches NonStop SQL/MP
compilations. Using this strategy, the NonStop ODBC Server saves NonStop SQL/MP
compilations in such a way that subsequent SQL execution can be done directly
without the NonStop SQL/MP compile step.
The NonStop ODBC Server determines during statement translation which statements
can be cached (also configurable within the profile for a user). If a statement can be
cached—and caching is enabled for that user—the NonStop ODBC Server always
checks the cache first before issuing a NonStop SQL/MP compilation instruction. The
key for the cache is the NonStop SQL/MP statement itself, with extra blanks removed
(“Select * from T” and “Select * From T are equivalent”).
Only DML (SELECT, INSERT, UPDATE, and DELETE) statements are eligible for
caching. To improve caching, performance literals in WHERE expression clauses are
translated into parameters if the operator is “=”. The other operators cannot be
automatically converted because the optimizer views them as having different
sensitivity according to the test value, causing wide ranging and not always valid query
plans to be generated.
Figure 2-33. NonStop SQL/MP Execution in SQLCI and NonStop ODBC Server
SQLCI
SQLCI2
NonStop
SQL/MP
Dynamic SQL
(20 max.)
NonStop ODBC
Server
NonStop
SQL/MP
Extended
Dynamic SQL
(1600+ max)
VST037.vsd