Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

When I alter a table in DB, I need to reorg it:

Call Sysproc.admin_cmd ('reorg Table myTable');

if I had done many modifications, how can I know which tables need a reorg?

share|improve this question

migrated from stackoverflow.com Apr 16 '13 at 21:25

This question came from our site for professional and enthusiast programmers.

    
StackOverflow is for questions about programming problems. Database management questions belong on DBA.stackexchange.com –  WarrenT Apr 16 '13 at 16:54
    
Also when asking DB management issues for DB2, please specify which DB2 you are asking about. There are three members of the DB2 family. One for z/OS on mainframes, one for IBM i on Power Systems, and one for Linux, Unix, Windows [LUW]. –  WarrenT Apr 16 '13 at 17:20

1 Answer 1

up vote 2 down vote accepted

The reorg is necessary when the table content has changed (lots of inserts, lots of updates, many deletes, a combination of all of that) and you can query which tables need reorganization via 'REORGCHK'

http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.cmd.doc/doc/r0001971.html

share|improve this answer
    
thanks AngocA :) –  neila Apr 16 '13 at 13:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.