Chinaunix

标题: 如何判断DOL表需要reorg? [打印本页]

作者: piml_lv    时间: 2010-12-27 17:00
标题: 如何判断DOL表需要reorg?
如何判断DOL表需要reorg?

有没有什么不影响业务的重建方法?

一般都怎么去reorg 呢?
作者: andkylee    时间: 2010-12-27 18:51
判断表是否需要执行reorg操作,可以先用datachange函数来判断表上的更新频率。

对于DOL可以用with resume 和 time参数。 对于APL表的话,找个空闲时间吧,或者重建索引也行。
对apl表执行regorg rebuild操作的时候会加锁影响业务使用。
作者: andkylee    时间: 2010-12-27 18:52
When you run reorg rebuild on a table, it locks the table for the entire time it takes to rebuild the table and its indexes. This means that you should schedule the reorg rebuild command on a table when users do not need access to the table.

All of the other reorg commands, including reorg rebuild on an index, lock a small number of pages at a time, and use short, independent transactions to perform their work. You can run these commands at any time. The only negative effects might be on systems that are very I/O bound.




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2