SQL/MX 2.x Database and Application Migration Guide (G06.23+, H06.04+, J06.03+)

Migrating SQL/MX Release 1.8 Applications to
SQL/MX Release 2.x
HP NonStop SQL/MX Database and Application Migration Guide540435-005
7-8
Converting SQLJ Applications to JDBC/MX
The changes in the query optimizer and UPDATE STATISTICS include:
Replacing the MATERIALIZE operator with the ORDERED_HASH_JOIN operator.
As a result, a query plan from an earlier release that contains a MATERIALIZE
operator does not work.
Improved traversal of join order that speeds up query plan compilation. As a result,
some SQL/MX Release 1.8 query plans might be excluded from consideration by
the current optimizer.
Changes to UPDATE STATISTICS that affect cardinality estimates. As a result, the
SQL/MX Release 2.x optimizer traverses different plans in the search space than
does the SQL/MX Release 1.8 optimizer.
More aggressive tuning of undesirable plans by the optimizer. As a result, the
current optimizer does not consider some SQL/MX Release 1.8 query plans.
For more information about the CONTROL QUERY SHAPE statement and the
UPDATE STATISTICS command, see the
SQL/MX Reference Manual.
Converting SQLJ Applications to JDBC/MX
On systems running G-series RVUs, the HP NonStop SQL/MX SQLJ (product T1232)
has reached MATURE support status, meaning that requests for enhancements
(RFEs) are not considered and that only critical defects are repaired. On systems
running H-series RVUs, SQLJ is not supported.
If you have SQLJ applications, convert them to Java applications that use JDBC/MX
method calls:
1. Change the
.sqlj source files to .java files.
2. In the source code, convert the SQLJ clauses to JDBC/MX method calls.
3. Compile the source code by using the
javac compiler.
For more information about JDBC/MX, see the
JDBC Driver for SQL/MX Programmer’s
Reference.