关于重建LOB字段的表后是否需要重建LOB索引(试验)

SQL> create table test123
  2    (t clob)
  3   lob(t) store as (disable storage in row);
 
Table created
SQL> select SEGMENT_NAME,SEGMENT_TYPE,tablespace_name from user_segments;
 
SEGMENT_NAME                                                                     SEGMENT_TYPE       TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------ ------------------------------
SYS_IL0000053986C00001$$                                                         LOBINDEX           PPZHU
SYS_LOB0000053986C00001$$                                                        LOBSEGMENT         PPZHU
TEST123                                                                          TABLE              PPZHU
 
SQL> alter table test123 move tablespace ooo;
 
Table altered
SQL> select SEGMENT_NAME,SEGMENT_TYPE,tablespace_name from user_segments;
 
SEGMENT_NAME                                                                     SEGMENT_TYPE       TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------ ------------------------------
SYS_IL0000053986C00001$$                                                         LOBINDEX           PPZHU
SYS_LOB0000053986C00001$$                                                        LOBSEGMENT         PPZHU
TEST123                                                                          TABLE              OOO
 SQL> alter table test123 move lob(t) store as( tablespace ooo);
 
Table altered
 
SQL> select SEGMENT_NAME,SEGMENT_TYPE,tablespace_name from user_segments;
 
SEGMENT_NAME                                                                     SEGMENT_TYPE       TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------ ------------------------------
TEST123                                                                          TABLE              OOO
SYS_IL0000053986C00001$$                                                         LOBINDEX           OOO
SYS_LOB0000053986C00001$$                                                        LOBSEGMENT         OOO
 
SQL> select STATUS from dba_indexes where index_name='SYS_IL0000053986C00001$$';
 
STATUS
--------
VALID
 
最后是有效的不需要重建。
上一篇:【学习资料】第12期快速入门PostgreSQL应用开发与管理 - 2 Linux基本操作


下一篇:【学习资料】第13期快速入门PostgreSQL应用开发与管理 - 3 访问数据