Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Free Space within Table or Index
Hi there!
There exists another (third) way to check the free space of a segment:
just create the package dbms_space
($ORACLE_HOME/rdbms/admin/dbmsutil.sql
and call the procedure procedure dbms_space.unused_space(segment_owner
IN varchar2,
segment_name IN varchar2,
segment_type IN varchar2,
total_blocks OUT number,
total_bytes OUT number,
unused_blocks OUT number,
unused_bytes OUT number,
last_used_extent_file_id OUT number,
last_used_extent_block_id OUT number,
last_used_block OUT number);
The advantage is that you don't need to analyze the table/index/cluster and that the results are exact.
Yours
Tobias
Dick Allie wrote:
> Neil Boemio wrote:
> >
> > When creating a new table or index and after loading up the data,
I'd
> > like to be able to tell if I have sized the object too small or much
too
> > big. Is there any view which will tell me how much free space
exists
> > within a table or index?
> >
> > ___________________________________________
> > _/_/_/ Neil Boemio _/_/_/
> > _/_/_/ nboemio_at_bway.net _/_/_/
> > _/_/_/ http://www.bway.net/~nboemio/ _/_/_/
> HI,
> You can analyze the table with the compute statistics parameter.
> Then look at all_tables with that tablename. The empty blocks field
> will tell you if you have wasted space. Also avg row length will let
> you compute how many rows can be added to each block. This should
> give you some indication as to how well you guessed at the initial
> table size.
> Hope this helps.
> Dick
Received on Thu Aug 21 1997 - 00:00:00 CDT
![]() |
![]() |