Index on which tablespace
-
28-10-2019 - |
Question
How to find out which 'tablespace' a particular 'index' belongs to. (oracle) (need to use it via jdbc)
Solution
The information is in the ALL_INDEXES (or USER_INDEXES) view:
select tablespace_name
from all_indexes
where owner = 'MYSCHEMA'
and index_name = 'MYINDEX';
OTHER TIPS
user_indexes.tablespace_name
is null for partitioned indices.
Viewing Information About Partitioned Tables and Indexes suggests that user_ind_partitions
view can be used to check containing tablespace for each separate index partition:
select index_name, partition_name, tablespace_name from user_ind_partitions
where index_name = 'MYINDEX';
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow