Home > Oracle > Rebuilding indexes

Rebuilding indexes

Rebuild indexes

select distinct ‘alter index OLASADM.’||segment_name||’ rebuild tablespace E5INDEX2 online;’
from dba_segments
where owner = ‘OLASADM’
and segment_type = ‘INDEX’
and tablespace_name = ‘E5INDEX’;
 

Rebuild index  partitions

select distinct ‘alter index OLASADM.’||segment_name||’ rebuild partition ‘||partition_name||’ tablespace E5INDEX2 online;’
from dba_segments
where owner = ‘OLASADM’
and segment_type = ‘INDEX PARTITION’
and tablespace_name = ‘E5INDEX’;

Rebuild index Sub partitions

select distinct ‘alter index olasadm.’||index_name||’ rebuild subpartition ‘||subpartition_name||’ tablespace E5INDEX2 online;’
from dba_ind_subpartitions
where index_owner = ‘OLASADM’
and tablespace_name = ‘E5INDEX’ ;

Advertisements
Categories: Oracle
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: