SELECT tablespace_name, index_name, status
FROM dba_indexes
WHERE index_name = '&index_name';
A status of 'UNUSABLE' is resolved by rebuilding the index (see later)CREATE INDEX myIndex ON myTable(myCol1,myCol2);
CREATE INDEX myuser.user_id_idx ON myuser.myaudit(user_id)
PCTFREE 10
INITRANS 2
MAXTRANS 255
COMPUTE STATISTICS
STORAGE(INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT
CELL_FLASH_CACHE DEFAULT)
TABLESPACE myts ;
TODO
"This procedure determines the cost of creating an index on an existing table. The input is the DDL statement that will be used to create the index. The procedure will output the storage required to create the index."
Probably not... almost all indexes, even where inserts/deletes affect random blocks, will find an equilibrium point at about 65%-70% utilisation. But, for the edge cases...
ANALYZE INDEX index_name VALIDATE STRUCTURE;
You can use rebuild to move an index to another tablespace.
Requires disk space to build a copy of the index (i.e. it does not rebuild in place).
Creates new index tree and shrinks heights
Coalesces leaf blocks that are in the same branch
Quickly frees index leaf blocks for use
You cannot specify REBUILD ONLINE for bitmap indexes or for indexes that enforce referential integrity constraints.
ALTER INDEX index_name REBUILD ONLINE;
DROP INDEX myIndex;