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.
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
2 replies Latest Post - 2012-11-02T21:36:32Z by nivanov1
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 PostsACCEPTED ANSWER
Re: executeBatch statement containing delete queries is slow in db2 environment2012-10-29T14:46:32Z in response to SystemAdminHello Nikita,
Why not extracting the explain plan for these delete statements. For example, you could use the db2expln command :
nivanov1 100000H9H753 PostsACCEPTED ANSWER
Re: executeBatch statement containing delete queries is slow in db2 environment2012-11-02T21:36:32Z in response to SystemAdminMay 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