RE: How do I find the size of a table

RE: How do I find the size of a table

 

  

Erica,
There is shorter code but I am a LazyDBA and don't feel like look for
the shorter code! Hehe.

select
segment_name,
sum(bytes) bytes,
sum(bytes)/1024/1024 mbytes,
sum(extents) extents
from
(SELECT
segment_name,
tablespace_name,
bytes,
extents
FROM
user_segments
where
segment_type='TABLE'
union
select
l.table_name segment_name,
s.tablespace_name,
bytes,
extents
from
user_lobs l,
user_segments s
where
l.segment_name=s.segment_name
union
select
l.table_name segment_name,
l.tablespace_name,
bytes,
extents
from
user_indexes l,
user_segments s
where
l.index_name=s.segment_name)
group by segment_name
/






Please take a few minutes to provide feedback on the quality of service you received. The Department of Education values your feedback as a customer. Commissioner John L. Winn is committed to continuously assessing and improving the level and quality of services provided to you by Department staff. Simply use the link below. Thank you in advance for completing the survey.


http://data.fldoe.org/cs/default.cfm?staff=Ed.[Email address protected]




-----Original Message-----
From: Erica Raymond
[mailto:oracledba-ezmlmshield-x43993552.[Email address protected]
Sent: Thursday, February 01, 2007 9:37 AM
To: LazyDBA Discussion
Subject: How do I find the size of a table

Hi All,

How do I find the size of a table in the database?? I have an 8k block
DB (i.e. 8192 )


Thanks,

ER


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html

Oracle LazyDBA home page