Capturing IQ query plans

From SybaseWiki
Revision as of 09:21, 12 April 2007 by Psap (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Capturing IQ query plans can be done when you set a few options. With the options given below a query plan is generated into the IQ message file for each query run from your session (since the option is temporary). Output from the index advisor is also added.

set     temporary option query_plan = on
set     temporary option query_plan_after_run = on
set     temporary option query_timing = on
set     temporary option query_detail = on
set     temporary option row_counts = on
set     temporary option index_advisor = on

With these options the query plan is also generated in HTML format. For practical reasons store these plans into a separate directory. The directory should be accessible by the IQ server.

set     temporary option query_plan_as_html = on
set     temporary option query_plan_as_html_directory = '<directory>'