2

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?

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
2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy