db2db2-luwdb2-connect

How to rebuild index in DB2 9.7 LUW


How I can rebuild indexes in DB2 9.7 LUW.

Is there any rebuild utility for index or do I have to recreate all indexes?


Solution

  • 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