| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: object size?
If you:
select bytes
from user_segments
where segment_name = {table_name} and
segment_type = 'TABLE';
You will get the number of bytes that is allocated to the table. When
you create a table (with minextents 1) the number of bytes returned from
the above query will be the size of your initial extent. (or close to it,
there is some rounding to blocks and nearest 5 blocks depending on the
number of blocks you requested as an initial). At this point, the table is
empty.
If you want to see how much of the allocated space is used, you can run:
analyze table { table_name} compute statistics; and check the blocks column on the user_tables view and multiply this by you blocksize -
OR
select count(distinct(substr(rowid,1,8))||substr(rowid,15,4))
from {table_name};
Obviously this will be effected by the values of PCTFREE...,
ptsao_at_sequeltech.com wrote in article <32F91188.3B9_at_sequeltech.com>...
> Hi, All,
>
> How can I figure out the size of an object? for example,a table's size.
>
> I tried to get some info out of user_object_size and dba_extents
> but it seems to me those are not the right place.
> dba_extents seems to only give info on physical allocation. The size
> info does not change when objects get dropped.
> For a table, user_object_size gives some number on parsed_size which
> I don't have a clue whatsoever.
>
> Thanks,
>
> Phil Tsao
>
Received on Thu Feb 06 1997 - 00:00:00 CST
![]() |
![]() |