Query Plan Changes

New load execution plans and query plan nodes in SAP Sybase IQ 16.0.

Load Execution Plans

The Interactive SQL Query Plan Viewer now supports SAP Sybase IQ load execution plans. Load execution plans detail the steps that the database engine uses to insert data into a table.

Load plans use the same database options as query execution plans. Text versions of the plan are written to the .iqmsg file. HTML versions include a Data Flow Object (DFO) tree that identifies the number of rows processed at each stage of the load. Different SQL statements generate different DFO trees and the same statement may generate different trees for different kind of tables (un-partitioned, range partitioned, hash partitioned, hash-range partitioned, etc.).

Load execution plans support these SQL statements:
  • LOAD..INTO
  • INSERT..LOCATION
  • INSERT..VALUES
  • INSERT..INTO
  • CREATE INDEX
  • ALTER TABLE ADD column (with default value)
  • DECLARE CURSOR FOR UPDATE
  • PARALLEL IQ statements

To generate a load plan, set the appropriate QUERY_PLAN options, then use the Interactive SQL Query Plan Viewer to create the plan.

Note: Use query plans only to evaluate the efficiency of a particular query or load.  Running SAP Sybase IQ with the QUERY_PLAN option set to ON can significantly impact performance, particularly as the volume of INSERT...VALUE statements increase.

New query plan nodes

Node Change Description
Distinct Sort (inserter) New node indicating early aggregation algorithm is used.
Distinct Sort (retriever) New node indicating early aggregation algorithm is used.
Grouping Sort (inserter) New node indicating early aggregation algorithm is used.
Grouping Sort (retriever) New node indicating early aggregation algorithm is used.
Join (Asymmetric Sort-Merge) New node indicating an asymmetric sort-merge join is used.
Join (Asymmetric Sort-Merge PushDown) New node indicating an asymmetric sort-merge join is used.
Order By (Full Rewind) New node indicating an asymmetric sort-merge join is used. Displays on the right branch of a Join (Asymmetric Sort-Merge) node.
Order By (Per-Work-Unit) New node indicating an operator that performs a sort on a work-unit worth of data. For example, it displays on the left branch under a Join (Asymmetric Sort-Merge) node.

Additional Information

  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_DETAIL Option
  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_NAME Option
  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_PLAN Option
  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_PLAN_AFTER_RUN Option
  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_PLAN_AS_HTML Option
  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_PLAN_AS_HTML_DIRECTORY Option
  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_PLAN_MIN_TIME
  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_PLAN_TEXT_ACCESS Option
  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_PLAN_TEXT_CACHING Option
  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_ROWS_RETURNED_LIMIT Option
  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_TEMP_SPACE_LIMIT Option
  • Reference: Statements and Options > Database Options > Alphabetical List of Options > QUERY_TIMING Option
Related concepts
Backward Compatibility: Changes to Default Behavior
Backward Compatibility: Migration Considerations
Connection Changes
Database Option Changes
JRE and Java Runtime Environment Variable Changes
Logical Server Policy Option Changes
Login Policy Option Changes
SQL Function Changes
SQL Statement Changes
Stored Procedure Changes
Tables and Views Changes
Utility Option Changes
DQP Performance Improvements