How to rebuild index in DB2 9.7 LUW

Masheed picture Masheed · Jul 4, 2014 · Viewed 8.2k times · Source

How I can rebuild index in DB2 9.7 LUW. Is there any rebuild utility for index or I have to recreate index.

Regards,

Masheed

Answer

Ramazan Polat picture Ramazan Polat · Aug 28, 2014

You can use REORG command to recreate ALL INDEXES on a table like this:

REORG INDEXES ALL FOR TABLE table1 ALLOW WRITE ACCESS CLEANUP ALL RECLAIM EXTENTS