Using SQL Editor to view SQL execution plan

About this task

New feature of viewing query execution plan is now available in InformixHQ v1.6.0 onwards.
  • Pre-requisite: For Informix server to generate execution plan, SQL tracing should be enabled. Once execution plan is generated by server, it will be available in the Execution plan tab of the SQL editor.

Procedure

  1. To view SQL execution plan, click on Execution Plan tab.
    SQLE-8
  2. If SQL tracing is disabled, user can enable SQL tracing from Execution Plan tab also. Click on Click here option from Execution Plan tab.
    SQLE-9
  3. Clicking on Click here, shows SQL tracing Configuration option. Click on Edit Configuration icon (Pencil icon).
    SQLE-10
  4. Clicking on Edit Configuration icon shows below SQL tracing option to configure.
    SQLE-11
    Note: Any selected database from the Schema Manager can be added in the traced databases list. User can remove selected database from the list by clicking Enable button.
  5. For enabling SQL Tracing on for selected databases or for all databases, click on Enable.
    SQLE-12
  6. To turn on SQL tracing for the selected databases, click on the databases drop-down & select databases from the list OR select all databases based on the requirement.
    SQLE-13
  7. Click on Save icon to save the configuration after changes are made.
    SQLE-14
    SQLE-15
  8. If SQL tracing is enabled from Execution plan tab, query needs to be re-executed for Informix server to generate execution plan. InformixHQ will ask user for the same, once SQL tracing is enabled form execution tab.
    SQLE-16
    • If user chooses Yes, query will be re-executed and plan will be displayed if available.
    • If user chooses No, then user needs to re-run the query to view query execution plan.
    Note: If execution plan is readily available, InformixHQ will fetch and display the query plan for given query. InformixHQ will try fetching SQL execution plan within first 10 seconds. If SQL execution is not shown within couple of tries, it is recommended to run the query from the SQL Editor.
  9. User can terminate fetching SQL execution plan by clicking on Terminate button.
    SQLE-17
  10. User can retry fetching SQL execution plan by clicking on Try Again button if InformixHQ is unable to fetch SQL execution plan.
    SQLE-18
  11. Once InformixHQ fetches SQL execution plan successfully, result will be shown in the Execution Plan tab.
    SQLE-19