Db2 Reorg Table Longlobdata
Db2 reorg table employee index empid on dbpartitionnum 1 3 4 db2 reorg table homer employee index homer empid on all dbpartitionnums except dbpartitionnum 2 to clean up the pseudo deleted keys and pseudo empty pages in all the indexes on the employee table while allowing other transactions to read and update the table enter.
Db2 reorg table longlobdata. If you add a clustering index you will have to reorganize the table before the data will be reordered. You can also reorg the data using the native db2 reorg command. By copying the organized data from the temporary tablesapce or by pointing to the new build objects in the tablespace where the table is being reorganized. Db2 describe table table schema table name look for columns with long and lob data types.
Determine space that can be reclaimed with longlobdata reorg command option. The longlobdata parameter is valid only for long and lob columns. By default longlobdata is not enabled because the reassembly of long and lob columns is time consuming. Reorg is a database operation that is executed in db2 to reorganize the table spaces or index spaces.
However you should be sure to use the longlobdata option to ensure that the lob data is included as part of the reorg. The purpose of the reorganization is data clustering. Db2 connect to mydb db2 reorgchk current statistics on table all this is a basic readout and reports on every table. Builds the copy of the reorganizing table in the tablespace where the table resides or in a temporary tablespace specified in reorg command.
The following command can be used to view the reorganization flags for the tables and the indices of the tables. Fortunately the db2pd utility returns this information. Please see the following links for official instructions. To keep it simple.
Match the page size of the table spaces in which the table data resides the db2 database product will try to find a temporary table space of the correct size of the long lob objects. Also recently added was the option to only reclaim extents at the table level or to only cleanup overflows on an index by index basis. Such a table space must exist for the reorganization to. Db2 9 7 table reorganization function is also expanded accordingly reorg command more longlobdata parameters.
This relatively simple analysis is performed by doing the following. In practise i just need to view the recent table reorg stats. This operation reconstructs the data in the table spaces or index spaces so that the data is unfragmented and physically continuous. This is a great feature if you re using table partitioning.