| Author's
name: Amarjyoti Dewri
Author's Email: adewri@rediffmail.com |
Date
written: June 24, 2003
Oracle version(s): Oracle 8i and above |
| An Index Organized Table was created and i cannot see the tablespace name from the user_tables. Why ? | |
The IOT name itself is a logical name and occupies no space. When an IOT is created it generates two segments.
1. An index name SYS_IOT_TOP_<IOT_object_id>.
2. Optionally an overflow table named SYS_IOT_OVER_<IOT_object_id>.
It is these two segments which occupy space and against which tablespace is visible. To view the tablespace_name first find the object_id of the table and then search against that object_id in all_indexes. Example:
|
-- Lets First Create a sample INDEX ORGANIZED TABLE named DELME_IOT. CREATE TABLE DELME_IOT --Now we will query the tablespace name against this table. SQL> select table_name,tablespace_name from all_tables TABLE_NAME TABLESPACE_NAME --Here we cannot see the tablespace name. Lets first find the object_id for this table. SQL> select object_id, object_name from all_objects where object_name like 'DELME_IOT'; OBJECT_ID OBJECT_NAME -- Here we have the object_id for the table DELME_IOT. Next we will query the all_indexes table. SQL> select table_name,index_name,tablespace_name from all_indexes where index_name like '%56709%'; TABLE_NAME INDEX_NAME TABLESPACE_NAME --Here we can see that tablespace name against the IOT |
Or simply the all_indexes table can be queried directly for the tablespace name.
Further reading: None