Home | Previous Page | Next Page   Administrative Utilities > Changing Modes and Shared Memory with the onmode Utility >

Dynamically Setting of SET EXPLAIN

Read syntax diagramSkip visual syntax diagramDynamically Change SQEXPLAIN Setting:
 
|-- -Y--sessionid--+-1-+----------------------------------------|
                   '-0-'
 
Element Purpose Key Considerations
-Y Dynamically set value of the SET EXPLAIN statement. None.

You can use the SET EXPLAIN statement to display the query plan of the optimizer, an estimate of the number of rows returned, and the relative cost of the query. When you use the onmode -Y command to turn on SET EXPLAIN, the output is displayed in the sqexplain.out.sessionid file. If an sqexplain.out file already exists, the database server uses that file until an administrator turns off the dynamic explain for the session.

The onmode -Y command dynamically changes the value of the SET EXPLAIN statement for an individual session. The following invocations are valid with this command:

Invocation Explanation
onmode -Y sessionid 1 Turns dynamic explain on for sessionid
onmode -Y sessionid 0 Turns dynamic explain off for sessionid

For more information on using the SET EXPLAIN statement, see the IBM Informix Guide to SQL: Syntax. For more information on interpreting the sqexplain.out file to improve query performance, see the IBM Informix Performance Guide.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]