ITeye博客

建索引 提升更新速度

dannyhz · 2018-01-31 18:14 · db2 · 企业架构 · Markdown

create index ind_rel_order_id on bat2_cmp_result_fail(rel_order_id); drop index IND_REL_ORDER_ID select * from SYSCAT.INDEXES where TABNAME='BAT2_CMP_RESULT_FAIL' ;

使用java 拿连接 connection 300ms

而更新动作 100万的数据 更新9条记录 ,字段没索引 需要9-13秒钟

字段有索引 , 执行只要87ms

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。