Hi All,
I was trying to benchmark a slow performing query and realized that
almost 83 seconds is being spent on prepare and only 0.001 sec is being
spent on execute. Dynamic package cache was flushed between each run
and I tried it for all optimization levels. for this i used a stmtheap
of 12288 x 4kb.
However I realised that as soon as I reduce the stmtheap to a lower
value say 4096, the prepare time goes down to almost 7 seconds, with no
change in the exec time.
Iam curious as to why this would happen? The query am running is
complex and I keep getting "SQL0437W Performance of this complex query
may be sub-optimal. Reason code:1"..
Iam hesitant to change this in production as it might impact other
queries which are performing well.
The environment is db2 v8 fp 10 suse linux es 9 with 8 procs.
Thanks for your inputs!