I am running a executeBatch() statement containing delete statements through java code. This batch runs very slow in db2. Also I am unable to monitor/track as in which delete statement is causing the batch to run slow.
Please help me on this.
Thanks in advance.
Pinned topic executeBatch statement containing delete queries is slow in db2 environment
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-11-02T21:36:32Z at 2012-11-02T21:36:32Z by nivanov1
SystemAdmin 110000D4XK5837 Posts
Re: executeBatch statement containing delete queries is slow in db2 environment2012-10-29T14:46:32ZThis is the accepted answer. This is the accepted answer.Hello Nikita,
Why not extracting the explain plan for these delete statements. For example, you could use the db2expln command :
nivanov1 100000H9H753 Posts
Re: executeBatch statement containing delete queries is slow in db2 environment2012-11-02T21:36:32ZThis is the accepted answer. This is the accepted answer.May be something like this:
select stmt_text from table(mon_get_pkg_cache_stmt('D',null,null,null))
order by TOTAL_CPU_TIME/NUM_EXEC_WITH_METRICS desc
fetch first 10 rows only