I would like to use the PlanExporter tool to view a query plan in xml.
But I am having a hard time figuring out how to use this tool. The
documentation on PlanExporter is divided between a couple user guides,
and somehow, flipping back and forth between them, I have managed to not
understand how to operate the tool. Here is my attempt to get
xplain-style statistics for a query. As you can see, I can't locate the
stmt_id:
ij version 10.11
ij> connect 'jdbc:derby:db;create=true';
ij> call syscs_util.syscs_set_runtimestatistics(1);
0 rows inserted/updated/deleted
ij> call syscs_util.syscs_set_xplain_schema('MY_STATS');
0 rows inserted/updated/deleted
ij> select tablename from sys.systables where 1=2 order by tablename;
TABLENAME
--------------------------------------------------------------------------------------------------------------------------------
0 rows selected
ij> call syscs_util.syscs_set_runtimestatistics(0);
0 rows inserted/updated/deleted
ij> select stmt_id from my_stats.sysxplain_statements;
STMT_ID
------------------------------------
0 rows selected
ij> call syscs_util.syscs_set_xplain_schema('');
0 rows inserted/updated/deleted
Thanks,
-Rick