Find size of Table,Index and USER/SCHEMA in Oracle
SIZE OF TABLE:
Select segment_name,sum(bytes)/1024/1024/1024 as “SIZE in
GB” from user_segments where segment_name=’TABLE_NAME’ group by segment_name;
OR
select owner,segment_name,sum(bytes)/1024/1024/1024 as “SIZE
in GB” from dba_segments where owner=’SCHEMA_NAME’ and segment_name=’TABLE_NAME’
group by owner,segment_name;
SIZE OF INDEX:
select segment_name,sum(bytes)/1024/1024/1024 as “SIZE in
GB” from user_segments where segment_name=’INDEX_NAME’ group by segment_name;
OR
select owner,segment_name,sum(bytes)/1024/1024/1024 as “SIZE
in GB” from dba_segments where owner=’SCHEMA_NAME’ and
segment_name=’INDEX_NAME’ group by owner,segment_name;
SIZE OF A USER/SCHEMA:
select owner,sum(bytes)/1024/1024/1024 as “SIZE in GB” from
dba_segments where owner=’SCHEMA_NAME’ group by owner;
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment
Note: only a member of this blog may post a comment.