Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Displaying the Optimizer Plan of an Executing Query > Displaying the Plan of a Currently Executing Query >

Limitations on Displaying Current Query Plans

The onmode -q explain session_id immediate command is valid only on the connection coserver.

This command also returns an error if no SQL statement is currently being executed in the specified session, or if the file to which the command attempts to write the query plan has read-only permissions, or if another session already has the file open for writing.

If a previously executed SET EXPLAIN FILE TO statement of SQL in the same session has already opened the same filename as a parameter to onmode -q explain session_id immediate, then onmode does not print the query plan, because the query plan would have already been written by the session. Instead, onmode returns an error.

The avoid_execute option is not supported with the file or fileappend options. To output the plan to a file and also prevent execution of the query requires two onmode -q explain commands:

You can achieve the equivalent result with two DB-Access commands:

For more information about command-line options of the onmode utility, see Appendix A. Syntax Summaries of Selected Utilities.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]