SQL/MP Version Management Guide

Version Compatibility for SQL Programs
Compaq NonStop™ SQL/MP Version Management Guide429833-001
7-13
Migrating to a Newer Version
A query that uses a predicate involving exponentiation to select from a table that has
a partition on a node using version 1 SQL software. The version 1 software does not
recognize exponentiation. In this case, the version 300 or newer SQL compiler again
selects a plan in which the predicate is evaluated by the executor instead of by the
disk process. If the predicate can be rewritten without exponentiation, or if the
partition is moved to a node using version 2 or newer software, the more efficient
plan in which the predicate is evaluated by the disk process can be used.
A query that uses a predicate involving unsigned decimal numbers selects from a
table that has a partition on a node using version 1 SQL software. A version 2 or
newer SQL compiler generates object code comparing unsigned decimal numbers,
which is more efficient than the code generated by the version 1 compiler. However,
the disk process on the node with the version 1 software cannot execute the version
2 code. In this case, a newer version SQL compiler uses the older, less efficient
method for comparing numbers.
A query that has a series of predicates connected by ORs selects from a table that
has a partition on a node using version 1 SQL software. A version 2 or newer SQL
compiler uses a special query execution plan for such predicates, but this plan
cannot be used on the node running version 1 software. As a result, the compiler
uses another, less efficient method for evaluating the predicate.
The SQL compiler does not use a newer version query execution plan for any query that
accesses a table or partition of a table on a node where the version of SQL/MP is older
than the version of the compiler.
Figure 7-3
illustrates query execution with a plan that uses features not supported by
nodes on which the queried table or partition resides.