SELECT TABSCHEMA, TABNAME FROM SYSIBMADM.ADMINTABINFO WHERE REORG_PENDING = 'Y' WITH UR
to find tables that need REORG.
This SQL works fine, except it runs for about 5 minuts on a database with couple of thousend tables.
Is there a faster way to get tables that need REORG?
This topic has been locked.
1 reply Latest Post - 2012-07-27T13:20:27Z by SystemAdmin
Pinned topic Find table that need REORG
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-07-27T13:20:27Z at 2012-07-27T13:20:27Z by SystemAdmin
SystemAdmin 110000D4XK5837 PostsACCEPTED ANSWER
Re: Find table that need REORG2012-07-27T13:20:27Z in response to SystemAdminHello Kovi,
Tables in Reorg Pending State cannot be accessed before a REORG is performed: this happens for example when you drop a column. Many other tables might need a Reorg even if they are not in Reorg Pending State.
The command reorgchk which checks the need for a reorg. You can also let DB2 handle this automatically by means of Automatic Maintenance.