# REORG INDEXES/TABLE 命令

table选项 通过重建行来剔除碎片数据 和压缩信息来 重组一个表(The table option reorganizes a table by reconstructing the rows to eliminate fragmented data, and by compacting information)，在一个分区表上，你可以重组一个单一分区。

## Authorization权限

• SYSCTRL
• SYSMAINT
• CONTROL privilege on the table.

Database/数据库

# 命令语法

>>-REORG-------------------------------------------------------->

>--+-TABLE--table-name--| Table clause |--------------------------------+-->
+-+-INDEXES ALL FOR TABLE--table-name------------+--| Index clause |-+
| '-INDEX--index-name--+-----------------------+-'                   |
|                      '-FOR TABLE--table-name-'                     |
|                                     .-ALLOW WRITE ACCESS-.         |
'-TABLE--table-name--RECLAIM EXTENTS--+--------------------+---------'
'-ALLOW NO ACCESS----'

>--+-------------------------------+---------------------------->
'-| Table partitioning clause |-'

>--+-------------------------------+---------------------------><
'-| Database partition clause |-'

Table clause

|--+-------------------+---------------------------------------->
'-INDEX--index-name-'

.-KEEPDICTIONARY--.
>--+-+-------------------+--+-------------------+--+-----------+--+---------------------+--+-----------------+-+--|
| +-ALLOW NO ACCESS---+  '-USE--tbspace-name-'  '-INDEXSCAN-'  '-| longlob-options |-'  '-RESETDICTIONARY-' |
|            .-ALLOW WRITE ACCESS-.                        .-START--.                                       |
'-INPLACE--+-+--------------------+--+------------------+--+--------+-+-------------------------------------'
| '-ALLOW READ ACCESS--'  '-NOTRUNCATE TABLE-'  '-RESUME-' |
'-+-STOP--+------------------------------------------------'
'-PAUSE-'

longlob-options

|--LONGLOBDATA--+-----------------------+-----------------------|
'-USE--longtbspace-name-'

Index clause

.-REBUILD---------------.
|--+--------------------+--+-----------------------+------------|
+-ALLOW NO ACCESS----+  '-space-reclaim-options-'
+-ALLOW WRITE ACCESS-+

space-reclaim-options

|--+--------------------+--+-----------------+------------------|
|          .-ALL---. |  '-RECLAIM EXTENTS-'
'-CLEANUP--+-------+-'
'-PAGES-'

Table partitioning clause

|--ON DATA PARTITION--partition-name----------------------------|

Database partition clause

|--ON----------------------------------------------------------->

>--+-+-DBPARTITIONNUM--+--| Partition selection clause |-------------------------------------+--|
| '-DBPARTITIONNUMS-'                                                                     |
'-ALL DBPARTITIONNUMS--+----------------------------------------------------------------+-'
'-EXCEPT--+-DBPARTITIONNUM--+--| Partition selection clause |--)-'
'-DBPARTITIONNUMS-'

Partition selection clause

.-,--------------------------------------------------.
V                                                    |
|--(----db-partition-number1--+--------------------------+-+--)--|
'-TO--db-partition-number2-'


## 命令参数Command parameters

### INDEXES ALL FOR TABLE table-name

指定要重组的索引所属的表，这个表可以是位于本地数据库，也可以是位于远程数据库。

### INDEX index-name

指定一个位于数据分区表上的 要重组的独立索引。 对于单一索引的重组仅支持在一个分区表上的非分区索引。这个参数不支持块索引(*block indexes*).

### FOR TABLE table-name

指定   非分区索引索引名是创建在  的那个表名称。鉴于一个数据库内的索引名称是唯一的，这个参数是可选的。

### 重组索引的访问方式选项

#### ALLOW NO ACCESS

• 对于重组全部索引，这个选项指定 在索引重建过程中 其他用户不可以访问表。如果对一个分区表指定了ON DATA PARTITION子句，则只有指定非分区严格限制该访问模式。
• 对于重组单一索引，这个选项指定 在非分区索引重组时， 索引所在的表不能被其他用户访问。

• 对于重组 全部索引，这个选项指定 在索引重建过程中 其他用户只能对表进行只读访问。ALLOW READ ACCESS模式不支持在一个分区表上 重组全部索引，除非指定了CLEANUP或RECLAIM EXTENTS选项，或者指定了ON DATA PARTITION 子句。如果对一个分区表指定了ON DATA PARTITION子句，则只有指定非分区严格限制该访问模式。
• 对于重组单一索引，这个选项指定 在非分区索引重组时， 索引所在的表仅允许用户进行只读访问。

#### ALLOW WRITE ACCESS

• 对于重组 全部索引，这个选项指定 在索引重组时，其他用户可以对表进行读写访问。ALLOW WRITE ACCESS模式不支持分区表，除非指定了CLEANUP或RECLAIM EXTENTS选项，或者指定了ON DATA PARTITION 子句。如果对一个分区表指定了ON DATA PARTITION子句，则只有指定非分区严格限制该访问模式。
• 对于重组单一索引，这个选项指定 在非分区索引重组过程中 可以读写表。
• ALLOW WRITE ACCESS 模式不支持多维集群( multidimensional clustering (MDC))或插入时间集群（ITC）表和扩展索引，除非指定了CLEANUP或RECLAIM EXTRNTS 选项。

下面的条目适用于数据分区表 当REORG INDEXES ALL命令指定了ON DATA PARTITION子句时 的 数据分区表：

• 只有指定数据分区严格限制访问模式级别。在一个指定的分区的分区表索引被重组的过程中，表的其他分区允许用户读写。
下面的 表 列出当指定了ON DATA PARTITION子句时，表的其他分区上支持的和允许的一致性访问。

  表格1：当指定REORG INDEXES ALL 命令的ON DATA PARTITION 子句时 ，支持的 访问模式和并发(*concurrent*)访问允许



|Access mode | 指定分区上的并发访问允许|其他分区上的并发访问允许|

|--|--|--|
| ALLOW NO ACCESS |不允许访问 | 读写访问|
| ALLOW READ ACCESS | 分区上可读直到索引被更新| 读写访问|
| ALLOW WRITE ACCESS | 分区上读写访问直到索引被更新| 读写|

• 只有 指定分区的 分区索引被重组。分区表上的不分区索引不会被重组。
如果在表上有被标记为“失效”或“用于重构（rebuild）”的非分区索引，这些索引会在重组之前rebuild。如果没有，如果索引对象被标记为“失效”或“用于重构（rebuild）” 只有指定分区上的分区索引被重组或重构 .
• 当指定了 CLEANUP 或 RECLAIM EXTENTS选项时只有指定分区的分区索引被cleaned 。

REORG INDEXES 非分区表 不适用
Not applicable
Any ALLOW NO ACCESS,
ALLOW WRITE ACCESS
REORG INDEX 分区表 不适用
Not applicable
Any ALLOW NO ACCESS,
ALLOW WRITE ACCESS
REORG INDEXES 分区表 None REBUILD (不指定的话

ALLOW NO ACCESS 1
REORG INDEXES 分区表 ON DATA PARTITION REBUILD (不指定的话

ALLOW NO ACCESS,
ALLOW WRITE ACCESS
REORG INDEXES 分区表 有或没有ON DATA
PARTITION 子句

RECLAIM EXTENTS
ALLOW NO ACCESS,
ALLOW WRITE ACCESS

#### ALL

指定索引 应该 通过提交 pseudo 删除的键 和pseudo的 空页 而打扫干净。
CLEANUP ALL选项将会释放标记为(pseudo)空 的页，也会从非空的pages中提交标记(pseudo)删除的键。 如果合并可以 使得 合并后的叶子page上 至少有合并叶子页的 PCTFREE 的空闲空间的话, 这个选项也会尝试合并临近的叶子页, PCTFREE是 在索引创建时为索引定义的空闲空间百分比。默认的PCTFREE是10%。如果两个页可以合并，这两个页中的一个将被释放。在一个索引中pseudo删除的键（包含那些在pseudo空的页上的键 ）的数目 可以通过运行RUNSTATS命令，然后select NUMRIDS DELETED from SYSCAT.INDEXES来获得。ALL选项可以清空NUMRIDS DELETED 和 NUMEMPTY LEAFS ，在它们已经被确定要提交的情况下。

#### PAGES

这个选项指定 已提交的 pseudo空的页 需要 从索引树中移除。这将不会清空那些没有被标记为空的页上pseudo删除的键。既然它只检查那些标记为空的叶子页，那么大多数情况下就会比使用ALL选项 相对要快。
CLEANUP PAGES选项会搜索并且释放pseudo空的页。一个已经提交的pseudo空的页 是这样一个页，这个 页上的所有的键都被标记为删除，所有的这些删除操作都是等待被提交的( are known to be committed). 一个索引中 pseudo 空的页 可以通过运行RUNSTATS命令和审视 SYSCAT.INDEXES表中的NUM EMPTY LEAFS列来判定/裁定。 PAGES选项将会清扫 NUM EMPTY LEAFS 如果它们被 裁定为要提交的。

### INDEX index-name REBUILD

REBUILD选项是默认的，表现 在之前的版本中当没有指定CLEANUP和CONVERT子句时由 索引重组 提供的 相同的功能。索引重组的REBUILD选项 将索引数据重构（rebuild）到一组物理连续的页 physically contiguous pages）上。默认的访问模式基于表类型而不同

### TABLE table-name RECLAIM EXTENTS

Specifies the table to reorganize and reclaim extents that are not being used. The table-name variable must specify a multidimensional clustering (MDC), insert time clustering (ITC) table or column-organized tables. The name or alias in the form: schema.table-name can be used. The schema is the user name under which the table was created. If you omit the schema name, the default schema is assumed.

For REORG TABLE RECLAIM EXTENTS when the ON DATA PARTITION clause is specified, the access clause only applies to the named partition. Users can read from and write to the rest of the table while the extents on the specified partition are being reclaimed. This situation also applies to the default access levels.


#### ALLOW NO ACCESS

For REORG TABLE RECLAIM EXTENTS, specifies that no other users can access the table while the extents are being reclaimed.

For REORG TABLE RECLAIM EXTENTS, specifies that other users can have read-only access to the table while the extents are being reclaimed.

#### ALLOW WRITE ACCESS

For REORG TABLE RECLAIM EXTENTS, specifies that other users can read from and write to the table while the extents are being reclaimed. This is the default option.

### TABLE table-name

指定要重组的表。这个表可以位于本地或远程数据库。名称或别名遵循以下形式：schema.table-name 的可以被使用。模式是表创建在哪个用户名下。如果你忽略了模式名，将使用默认的模式名。
对typed表，指定的表名称必须是继承的根表的名称。

• 如果在表上没有定义非分区索引（除了系统自动生成的XML路径索引），访问模式仅适用于指定的分区，用户被允许读写表的其他表。
• 如果（除了系统自动生成的XML路径索引）表上定义 了 非分区索引，默认使用ALLOW NO ACCESS访问模式，并且仅支持这个访问模式。在这种情况下，表被放在ALLOW NO ACCESS模式下。如果指定ALLOW READ ACCESS （允许读访问），将会返回SQL 1548N。
表格3：非分区表和分区表在表重组时支持的访问模式

REORG TABLE 非分区表 Not applicable ALLOW NO ACCESS,
REORG TABLE 分区表 Not specified ALLOW NO ACCESS1
REORG TABLE
(表上没有索引或者是只有分区索引)

REORG TABLE
(表上有除了系统生成的XML路径索引之外的其他非分区索引)

#### INDEX index-name

这个选项用来指定 当重新组织表的时候 使用的索引。如果你不以如下格式 schema.index-name指定全名，将使用默认的模式。默认模式是这个索引被创建在哪个用户下。数据库管理这个在表重组的时候使用这个索引来完全的对表中的数据进行重新排序。
对于一个in place表重组，如果集群索引 被定义在表上且指定了一个索引，那么必须指定的必须是这个集群索引。如果没有指定in place选项，可以指定任何索引。如果你不指明一个索引名，记录将不管顺序进行重组。如果这个表定义了一个集群索引，那么，即使是没有指明索引，也会使用该聚集索引来聚集表。如果你正在重组MDC表或IDC表，那么你不能指定索引。

如果一个表重组使用了INDEX，也使用了ON DATA PARTITION子句，那么只有指定的分区被使用该索引进行重组。

#### ALLOW NO ACCESS

指定在表重组的过程中其他用户不能访问该表。
ALLOW NO ACCESS是默认的模式，并且是在没有指定ON DATA PARTITION 子句 的情况下重组一个分区表时 唯一支持 的模式。

如果为一个数据分区表指定了 ON DATA PARTITION子句，那么只有这个被指定的数据分区被重组。

• 如果除了系统生成的XML路径索引之外表上没有定义非分区索引，只有指定的分区限制ALLOW NO ACCESS模式。运行用户读写该表的其他数据分区。
• access mode. In this case, the table is placed in ALLOW NO ACCESS mode.如果除了系统生成的XML路径索引之外，表上定义了非分区索引，那么ALLOW NO ACCESS是默认的模式并且是唯一支持的访问模式。

在重组过程中仅允许对表的读访问。

#### INPLACE（inplace: 在合适的位置）

在允许用户访问的情况下重新组织表。
合适位置表重组（In place table reorganization ）仅适用于非分区、非MDC、非ITC的表，且要求表中 没有扩展索引（extended indexes） 没有定义在XML列上的索引的情况。合适位置表重组只能在至少有3个页的表上执行。

合适位置表重组异步的进行，并且可能不立即生效。

    在表重组过程中仅允许读访问。
• ALLOW WRITE ACCESS

    在表重组过程中允许写访问，这是默认情况。
• NOTRUNCATE TABLE

    在合适位置重组之后不truncate表。在truncation时期，这个表加S锁。
• START

    开始 in place REORG处理过程。因为这是默认的，所以这个关键字是可选的。
• STOP

    在当前时间点停止in place进程。
• PAUSE

    为当前时间正在进行时的in place REORG 挂起或终止(* Suspend or pause in place REORG for the time being.*)。
• RESUME

    继续或恢复一个之前中断的in place 表重组。当一个在线重组被恢复后，并且你希望使用与重组中断时使用的相同的选项你必须在恢复时再指定一遍选项。


#### LONGLOBDATA

This is not required even if the table contains long or LOB columns. The default is to avoid reorganizing these objects because it is time consuming and does not improve clustering. However, running a reorganization with the LONGLOBDATA option on tables with XML columns will reclaim unused space and thereby reduce the size of the XML storage object.

This parameter is required when converting existing LOB data into inlined LOB data.

#### USE longtbspace-name

This is an optional parameter, which can be used to specify the name of a temporary table space to be used for rebuilding long data. If no temporary table space is specified for either the table object or for the long objects, the objects will be constructed in the table space they currently reside. If a temporary table space is specified for the table but this parameter is not specified, then the table space used for base reorg data will be used, unless the page sizes differ. In this situation, the DB2 database system will attempt to choose a temporary container of the appropriate page size to create the long objects in.

If USE longtbspace-name is specified, USE tbspace-name must also be specified. If it is not, the longtbspace-name argument is ignored.

#### KEEPDICTIONARY保持字典

If the COMPRESS attribute for the table is YES and the table has a compression dictionary then no new dictionary is built. All the rows processed during reorganization are subject to compression using the existing dictionary. If the COMPRESS attribute is YES and a compression dictionary doesn't exist for the table, a dictionary will only be created (and the table compressed) in this scenario if the table is of a certain size (approximately 1 to 2 MB) and sufficient data exists within this table. If, instead, you explicitly state REORG RESETDICTIONARY, then a dictionary is built as long as there is at least 1 row in the table. If the COMPRESS attribute for the table is NO and the table has a compression dictionary, then reorg processing will preserve the dictionary and all the rows in the newly reorganized table will be in noncompressed format. It is not possible to compress some data such as LOB data not stored in the base table row.

When the LONGLOBDATA option is not specified, only the table row data is reorganized. The following table describes the behavior of KEEPDICTIONARY syntax in REORG command when the LONGLOBDATA option is not specified.

#### RESETDICTIONARY

If the COMPRESS attribute for the table is YES then a new row compression dictionary is built. All the rows processed during reorganization are subject to compression using this new dictionary. This dictionary replaces any previous dictionary. If the COMPRESS attribute for the table is NO and the table does have an existing compression dictionary then reorg processing will remove the dictionary and all rows in the newly reorganized table will be in noncompressed format. It is not possible to compress some data such as LOB data not stored in the base table row.

If the LONGLOBDATA option is not specified, only the table row data is reorganized. The following table describes the behavior of RESETDICTIONARY syntax in REORG command when the LONGLOBDATA option is not specified.


#### ON DATA PARTITION partition-name

DB2 9.7 修补补丁1和之后的版本，这个子句可以用在REORG INDEXES ALL 命令之后来重组在某一个特定分区上非分区索引；可以用在REORG TABLE 命令之后来重组在一个特定分区上的数据。

#### ON DBPARTITIONNUM | ON DBPARTITIONNUMS

• db-partition-number1

    指定一个再数据库分区list中的数据库分区号。
• db-partition-number2

    Specifies the second database partition number, so that all database partitions from db-partition-number1 up to and including db-partition-number2 are included in the database partition list.
指定第二个数据库分区号，从而从*db-partition-number1*开始到*db-partition-number2*包含*db-partition-number2*的所有的数据库分区 都被包含在数据库分区列表中。


## Examples

### example 1

db2 reorg table homer.employee use mytemp1

### example 2

To reorganize tables in a partition group consisting of database partitions 1, 2, 3, and 4 of a four-partition system, you can enter either of the following commands:

  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)

### example 3

   db2 reorg indexes all for table homer.employee allow write access cleanup only

### example 4

   db2 reorg indexes all for table homer.employee allow write access cleanup only pages

### example 5

   db2 reorg table homer.employee use tempspace1

### example 6

  db2 reorg table employee index empid inplace start
db2 reorg table employee inplace pause
db2 reorg table homer.employee inplace allow read access notruncate table resume

## Usage notes

Restrictions:

• The REORG utility does not support the use of nicknames.
• The REORG TABLE command is not supported for declared temporary tables or created temporary tables.
• The REORG TABLE command cannot be used on views.
• Reorganization of a table is not compatible with range-clustered tables, because the range area of the table always remains clustered.
• REORG TABLE cannot be used on a partitioned table in a DMS table space while an online backup of ANY table space in which the table resides, including LOBs and indexes, is being performed.
• REORG TABLE cannot use an index that is based on an index extension.
• If a table is in reorg pending state, an inplace reorg is not allowed on the table.
• Concurrent table reorganization sharing the same temporary DMS table space is not supported.
• Before running a reorganization operation against a table to which event monitors write, you need to deactivate the event monitors on that table.
• For data partitioned tables:

• The table must have an ACCESS_MODE in SYSCAT.TABLES of Full Access.
• Reorganization skips data partitions that are in a restricted state due to an attach or detach operation. If the ON
• DATA PARTITION clause is specified, that partition must be fully accessible.
• If an error occurs during table reorganization, some indexes or index partitions might be left invalid. The nonpartitioned indexes of the table will be marked invalid if the reorganization has reached or passed the replace phase for the first data partition. The index partitions for any data partition that has already reached or passed the replace phase will be marked invalid. Indexes will be rebuilt on the next access to the table or data partition.
• If an error occurs during index reorganization when the ALLOW NO ACCESS mode is used, some indexes on the table might be left invalid. For nonpartitioned RID indexes on the table, only the index that is being reorganized at the time of the failure will be left invalid. For MDC tables with nonpartitioned block indexes, one or more of the block indexes might be left invalid if an error occurs. For MDC or ITC tables with partitioned indexes, only the index object on the data partition being reorganized will be left invalid. Any indexes marked invalid will be rebuilt on the next access to the table or data partition.
• When a data partitioned table with only partitioned indexes defined on the table is in the reorg pending state, issuing a REORG TABLE command with the ON DATA PARTITION clause brings only the specified data partition out of the reorg pending state. To bring the remaining partitions of the table out of the reorg pending state, either issue REORG TABLE command on the entire table (without the ON
DATA PARTITION clause), or issue a REORG TABLE command with the ON DATA PARTITION clause for each of the remaining partitions.

Information about the current progress of table reorganization is written to the history file for database activity. The history file contains a record for each reorganization event. To view this file, execute the LIST HISTORY command for the database that contains the table you are reorganizing.

You can also use table snapshots to monitor the progress of table reorganization. Table reorganization monitoring data is recorded regardless of the Database Monitor Table Switch setting.

If an error occurs, an SQLCA dump is written to the history file. For an inplace table reorganization, the status is recorded as PAUSED.

When an indexed table has been modified many times, the data in the indexes might become fragmented. If the table is clustered with respect to an index, the table and index can get out of cluster order. Both of these factors can adversely affect the performance of scans using the index, and can impact the effectiveness of index page prefetching. REORG INDEX or REORG INDEXES with the REBUILD option can be used to reorganize one or all of the indexes on a table. Index reorganization rebuild will remove any fragmentation and restore physical clustering to the leaf pages. Use the REORGCHK command to help determine if an index needs reorganizing. Be sure to complete all database operations and release all locks before invoking index reorganization. This can be done by issuing a COMMIT after closing all cursors opened WITH HOLD, or by issuing a ROLLBACK.

A classic table reorganization (offline reorganization) rebuilds the indexes during the last phase of the reorganization. When more than one temporary table space exists, it is possible that a temporary table space in addition to the one specified on the REORG TABLE command may be utilized for additional sorts that can accompanying table reorg processing. However, the inplace table reorganization (online reorganization) does not rebuild the indexes. It is recommended that you issue a REORG INDEXES command after the completion of an inplace table reorganization. An inplace table reorganization is asynchronous, therefore care must be taken to ensure that the inplace table reorganization is complete before issuing the REORG INDEXES command. Issuing the REORG INDEXES command before the inplace table reorganization is complete, might cause the reorganization to fail (SQLCODE -2219).

When the REORG rebuilds the indexes on an MDC table, the Full_Block hint bits are not set. Because the Full_Block hint is not set, you might experience degraded insert performance if you insert rows from existing dimension values after the REORG completes and the DB2_TRUST_MDC_BLOCK_FULL_HINT registry variable is turned on. The insert performance automatically improves for each dimension value after an insert of that dimension value completes. For more information, see DB2_TRUST_MDC_BLOCK_FULL_HINT performance variable.

Tables that have been modified so many times that data is fragmented and access performance is noticeably slow are candidates for the REORG TABLE command. You should also invoke this utility after altering the inline length of a structured type column in order to benefit from the altered inline length. Use the REORGCHK command to determine whether a table needs reorganizing. Be sure to complete all database operations and release all locks before invoking REORG TABLE. This can be done by issuing a COMMIT after closing all cursors opened WITH HOLD, or by issuing a ROLLBACK. After reorganizing a table, use RUNSTATS to update the table statistics, and REBIND to rebind the packages that use this table. The reorganize utility will implicitly close all the cursors.
With DB2 V9.7 Fix Pack 1 and later, REORG TABLE commands and REORG INDEXES ALL commands can be issued on a data partitioned table to concurrently reorganize different data partitions or partitioned indexes on a partition. When concurrently reorganizing data partitions or the partitioned indexes on a partition, users can access the unaffected partitions but cannot access the affected partitions. All the following criteria must be met to issue REORG commands that operate concurrently on the same table:

Each REORG command must specify a different partition with the ON DATA PARTITION clause.
Each REORG command must use the ALLOW
The partitioned table must have only partitioned indexes if issuing REORG TABLE commands. No nonpartitioned indexes (except system-generated XML path indexes) can be defined on the table.


For a partitioned table T1 with no nonpartitioned indexes (except system-generated XML path indexes) and with partitions P1, P2, P3, and P4, the following REORG commands can run concurrently:

REORG INDEXES ALL FOR TABLE T1 ALLOW NO ACCESS ON DATA PARTITION P1
REORG TABLE T1 ALLOW NO ACCESS ON DATA PARTITION P2
REORG INDEXES ALL FOR TABLE T1 ALLOW NO ACCESS ON DATA PARTITION P3

Operations such as the following are not supported when using concurrent REORG commands:

Using a REORG command without the ON
DATA PARTITION clause on the table.
Using an ALTER TABLE statement on the table to add, attach, or detach a data partition.
Performing an online backup that includes the table.


If the table contains mixed row format because the table value compression has been activated or deactivated, an offline table reorganization can convert all the existing rows into the target row format.

If the table is distributed across several database partitions, and the table or index reorganization fails on any of the affected database partitions, only the failing database partitions will have the table or index reorganization rolled back.

If the reorganization is not successful, temporary files should not be deleted. The database manager uses these files to recover the database.

If the name of an index is specified, the database manager reorganizes the data according to the order in the index. To maximize performance, specify an index that is often used in SQL queries. If the name of an index is not specified, and if a clustering index exists, the data will be ordered according to the clustering index.

The PCTFREE value of a table determines the amount of free space designated per page. If the value has not been set, the utility will fill up as much space as possible on each page.

To complete a table space rollforward recovery following a table reorganization, both regular and large table spaces must be enabled for rollforward recovery.

If the table contains LOB columns that do not use the COMPACT option, the LOB DATA storage object can be significantly larger following table reorganization. This can be a result of the order in which the rows were reorganized, and the types of table spaces used (SMS or DMS).

Indexes over XML data may be re-created by the REORG INDEXES/TABLE command. For details, see "Recreation of indexes over XML data".

An inplace REORG operation might not be able to fully reclaim space in a table because it cannot move internal records.

+ 订阅