You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by Apache Wiki <wi...@apache.org> on 2013/03/14 20:06:27 UTC
[Db-derby Wiki] Update of "OptimizerTracing" by RichardHillegas
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.
The "OptimizerTracing" page has been changed by RichardHillegas:
http://wiki.apache.org/db-derby/OptimizerTracing
New page:
You can trace the optimizer's analysis, one statement at a time. Optimizer tracing is enabled by this command:
{{{ call syscs_util.syscs_register_tool( 'optimizerTracing', true ); }}}
After enabling tracing, issue the query you want to trace. E.g.:
{{{ select columnname from sys.systables t, sys.syscolumns c where t.tableid = c.referenceid and t.tablename = 'SYSROLES'; }}}
Finally, turn tracing off and dump the trace. By default, the trace is printed on standard out. However, you can also force the trace to go into a file. Here's how you disable tracing and print the trace on standard out...
{{{ call syscs_util.syscs_register_tool( 'optimizerTracing', false ); }}}
...and here's how you disable tracing, printing the trace to the file z1.txt:
{{{ call syscs_util.syscs_register_tool( 'optimizerTracing', false, 'z1.txt' ); }}}