QUERY_PLAN_AS_HTML Option

Generates graphical query plans in HTML format for viewing in a Web browser.

Allowed Values

ON, OFF

Default

OFF

Scope

Option can be set at the database (PUBLIC) or user level. When set at the database level, the value becomes the default for any new user, but has no impact on existing users. When set at the user level, overrides the PUBLIC value for that user only. No system privilege is required to set option for self. System privilege is required to set at database level or at user level for any user other than self.

Requires the SET ANY PUBLIC OPTION system privilege to set this option. Can be set temporary for an individual connection or for the PUBLIC role. Takes effect immediately.

Remarks

QUERY_PLAN_AS_HTML causes graphical query plans to be generated in HTML format.

When you set this option, also set the QUERY_NAME option for each query, so you know which query is associated with the query plan.

SAP Sybase IQ writes the plans in the same directory as the .iqmsg file. Query plan file names follow these conventions:

user-name_query-name_server-type_server-number_YYYYMMDD_HHMMSS_query-number_fragment-number.html.

For example, if the user DBA sets the temporary option QUERY_NAME to 'Query_1123', a file created on November 8, 2012 at exactly 8:30 a.m. is called DBA_QUERY_1123_L_0__20121108_083000_4.html. The date, time, and unique query-number appended to the file name ensure that existing files are not overwritten. The server-type parameter indicates whether the plan originates from a leader (L) or worker (W) node. The server-number identifies the server where the plan originated when all html files are routed to a single directory.

On multiplex servers, worker nodes generate an html file for each fragment executed by the worker, which can result in multiple html files from a single query. These files are identified by fragment-number.

Note: If you use this feature, monitor your disk space usage so you leave enough room for your .iqmsg and log files to grow. Enable IQ message log wrapping or message log archiving to avoid filling up your message log file.

QUERY_PLAN_AS_HTML acts independently of the setting for the QUERY_PLAN option. In other words, if QUERY_PLAN_AS_HTML is ON, you get an HTML format query plan whether or not QUERY_PLAN is ON.

This feature is supported with newer versions of many commonly used browsers. Some browsers might experience problems with plans generated for very complicated queries.

Simplex Output Example

Output generated from a query plan named Q1123 on a simplex server:

DBA_QUERY_Q1123_L_0__20121108_083000_4.html

Simplex servers always return a server-type parameter that indicates that the plan originated on a leader (L) with a server-number equal to 0. Simplex output never includes a fragment-number.

Multiplex Output Example

Output generated from a query plan named Q101 executed on a multiplex server. The leader node (L) server-number is 1; worker (W) nodes are numbered 2 and 3. Notice the fragment-number that appears after the query number in the worker output.

Output generated from the leader node:

DBA_L_1_Q101_20121108_083000_94.html

Output from one of the worker nodes:

DBA_W_2_Q101_20121108_083000_94_2.html
DBA_W_2_Q101_20121108_083000_94_1.html

Corresponding output from another worker:

DBA_W_3_Q101_20121113-054928_94_2.html
DBA_W_3_Q101_20121113-054933_94_1.html
Related reference
QUERY_NAME Option
QUERY_PLAN Option
QUERY_PLAN_AFTER_RUN Option