It is likely that your indexes (or partitions thereof) will be set to unusable depending on the operation you do
SQL> create table src ( x int, y int )
2 partition by list ( x )
3 (
4 partition p1src values (1),
5 partition p2src values (2)
6 );
Table created.
SQL>
SQL> create index src_glob on src ( y ) ;
Index created.
SQL> create index src_loc on src ( x ) local;
Index created.
SQL>
SQL> create table arch ( x int, y int )
2 partition by list ( x )
3 (
4 partition p1arch values (1),
5 partition p2arch values (2)
6 );
Table created.
SQL>
SQL> create index arch_glob on arch ( y ) ;
Index created.
SQL> create index arch_loc on arch ( x ) local;
Index created.
SQL>
SQL> create table tmp ( x int, y int );
Table created.
SQL> create index tmp_loc on tmp ( x );
Index created.
SQL>
SQL> insert into src values (1,1);
1 row created.
SQL> insert into src values (2,2);
1 row created.
SQL>
SQL>
SQL>
SQL> alter table src exchange partition p1src with table tmp;
Table altered.
SQL>
SQL> select * from tmp;
X Y
---------- ----------
1 1
1 row selected.
SQL> select index_name, partition_name, status from user_ind_partitions where substr(index_name,1,3) in ('SRC','ARC','TMP')
2 union all
3 select index_name, null, status from user_indexes where substr(index_name,1,3) in ('SRC','ARC','TMP') ;
INDEX_NAME PARTITION_NAME STATUS
------------------------------ ------------------------------ --------
ARCH_LOC P1ARCH USABLE
ARCH_LOC P2ARCH USABLE
SRC_LOC P1SRC UNUSABLE
SRC_LOC P2SRC USABLE
ARCH_GLOB VALID
ARCH_LOC N/A
SRC_GLOB UNUSABLE
SRC_LOC N/A
TMP_LOC UNUSABLE
9 rows selected.
SQL>
SQL> alter table arch exchange partition p1arch with table tmp;
Table altered.
SQL>
SQL> select index_name, partition_name, status from user_ind_partitions where substr(index_name,1,3) in ('SRC','ARC','TMP')
2 union all
3 select index_name, null, status from user_indexes where substr(index_name,1,3) in ('SRC','ARC','TMP') ;
INDEX_NAME PARTITION_NAME STATUS
------------------------------ ------------------------------ --------
ARCH_LOC P1ARCH UNUSABLE
ARCH_LOC P2ARCH USABLE
SRC_LOC P1SRC UNUSABLE
SRC_LOC P2SRC USABLE
ARCH_GLOB UNUSABLE
ARCH_LOC N/A
SRC_GLOB UNUSABLE
SRC_LOC N/A
TMP_LOC UNUSABLE
9 rows selected.
SQL>
SQL> select * from arch;
X Y
---------- ----------
1 1
1 row selected.
SQL>
SQL>
SQL> create table src ( x int, y int )
2 partition by list ( x )
3 (
4 partition p1src values (1),
5 partition p2src values (2)
6 );
Table created.
SQL>
SQL> create index src_glob on src ( y ) ;
Index created.
SQL> create index src_loc on src ( x ) local;
Index created.
SQL>
SQL> create table arch ( x int, y int )
2 partition by list ( x )
3 (
4 partition p1arch values (1),
5 partition p2arch values (2)
6 );
Table created.
SQL>
SQL> create index arch_glob on arch ( y ) ;
Index created.
SQL> create index arch_loc on arch ( x ) local;
Index created.
SQL>
SQL> create table tmp ( x int, y int );
Table created.
SQL> create index tmp_loc on tmp ( x );
Index created.
SQL>
SQL> insert into src values (1,1);
1 row created.
SQL> insert into src values (2,2);
1 row created.
SQL>
SQL>
SQL>
SQL> alter table src exchange partition p1src with table tmp including indexes update indexes;
Table altered.
SQL> select * from tmp;
X Y
---------- ----------
1 1
1 row selected.
SQL> select index_name, partition_name, status from user_ind_partitions where substr(index_name,1,3) in ('SRC','ARC','TMP')
2 union all
3 select index_name, null, status from user_indexes where substr(index_name,1,3) in ('SRC','ARC','TMP') ;
INDEX_NAME PARTITION_NAME STATUS
------------------------------ ------------------------------ --------
ARCH_LOC P1ARCH USABLE
ARCH_LOC P2ARCH USABLE
SRC_LOC P1SRC USABLE
SRC_LOC P2SRC USABLE
ARCH_GLOB VALID
ARCH_LOC N/A
SRC_GLOB VALID
SRC_LOC N/A
TMP_LOC VALID
9 rows selected.
SQL>
SQL> alter table arch exchange partition p1arch with table tmp including indexes update indexes;
Table altered.
SQL>
SQL> select index_name, partition_name, status from user_ind_partitions where substr(index_name,1,3) in ('SRC','ARC','TMP')
2 union all
3 select index_name, null, status from user_indexes where substr(index_name,1,3) in ('SRC','ARC','TMP') ;
INDEX_NAME PARTITION_NAME STATUS
------------------------------ ------------------------------ --------
ARCH_LOC P1ARCH USABLE
ARCH_LOC P2ARCH USABLE
SRC_LOC P1SRC USABLE
SRC_LOC P2SRC USABLE
ARCH_GLOB VALID
ARCH_LOC N/A
SRC_GLOB VALID
SRC_LOC N/A
TMP_LOC VALID
9 rows selected.
SQL>
SQL> select * from arch;
X Y
---------- ----------
1 1
1 row selected.
SQL>
In 12.2 and 18c, there are a number of improvements in this area, which allow many partition operations to be done online.