On Sep 24, 1:40*am, "stefan.albert" <stefan.alb...@spb.dewrote:
Ok, that works. Now I want the explain with detailed information:
Which subsection works on what part of the SQL? This is provided by
"dynexplain" or "db2expln". But: I can't run statistics and then make
the explain, because for "db2expln" in the -setup option no runstats
are supported.
So I have NO chance to see the "optimzed" distribution of the SQL into
subsections when using runstats on DGTTs.
This is very helpful for further analysis: Which part of the running
SQL causes this high CPU/MEM-usage in subsection 6 (e.g.). This
information is given by snapshot for application for a running SQL.
But with runstats NO chance to see the part of SQL which is processed
in subsection 6...
On Sep 13, 8:31*pm, Serge Rielau <srie...@ca.ibm.comwrote:
w.l.fisc...@googlemail.com wrote:
Is it possible to have statistics on temporary tables? I frequently
put 10000 or more rows in a temporary table and would like to know it
the queries become faster with statistics on those tables.
Absolutely.
If you want to programatically collect statistics with a procedure
declaring a temp use the ADMIN_CMD() procedure
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Hi, Stefan.
It's quite possible I'm misunderstanding the core problem you're
trying to solve, so please bear with me, but if the issue is that you
want to EXPLAIN against the DGTT (indeed, the SQL in stored
procedures), you'll want to set a precompile option, to wit:
CALL SET_ROUTINE_OPTS_GET_ROUTINE_OPTS()||' EXPLAIN ALL');
And then run, e.g., db2exfmt
If the issue is that you're just lamenting that only abridged
statistics are collected and displayed for DGTTs, you're right.
--Jeff