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
-
To view SQL execution plan, click on Execution Plan tab.
-
If SQL tracing is disabled, user can enable SQL tracing from Execution Plan tab also.
Click on Click here option from Execution Plan tab.
-
Clicking on Click here, shows SQL tracing Configuration option. Click on Edit Configuration
icon (Pencil icon).
-
Clicking on Edit Configuration icon shows below SQL tracing option to configure.
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.
-
For enabling SQL Tracing on for selected databases or for all databases, click on
Enable.
-
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.
-
Click on Save icon to save the configuration after changes are made.
-
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.
- 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. -
User can terminate fetching SQL execution plan by clicking on Terminate button.
-
User can retry fetching SQL execution plan by clicking on Try Again button if InformixHQ
is unable to fetch SQL execution plan.
-
Once InformixHQ fetches SQL execution plan successfully, result will be shown in the
Execution Plan tab.