DBMS: Reorganize

An optimized database improves query performance, reduces processing times and reduces resource consumption (CPU, RAM, Storage, etc.). This is why it is essential to maintain an efficient organization of databases.

Hence the need for reorganization when this is not the case.
This task consists of physically reorganizing indexes and/or tables with the aim of optimizing the use of disk space and improving access to data (through their organization), recovering unused disk space, left by deleted records and/or data updates.

The operation to be carried out depends on the degree of dispersion of the index (or table) information in the database (called fragmentation):
– compaction (REORGANIZE or COMPACT) is often necessary for fragmentation between 10 and 30%
– beyond that, a reconstruction (REBUILD) must be carried out.
A “side effect” of rebuilding a table is rebuilding all of its indexes.

In any case, a successful database is a database that is monitored and maintained.