Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: questions regarding extents' total

Re: questions regarding extents' total

From: Winnie Liu <poohland_at_hotmail.com>
Date: Tue, 30 Jun 1998 21:46:17 -0700
Message-ID: <6ncen3$4m@dfw-ixnews10.ix.netcom.com>


You can query the dictionary table dba_extents, something like the following:

select segment_name,tablespace_name,extent_id from dba_extents
where segment_type='TABLE' and owner='XXX' and segment_name='<tablename>';

if your table segment contains 3 extents, you will have 3 separate rows having the extent_id 0,1,2.

The fastest way to find out the total number of extents for a specific table is,

select segment_name,max(extent_id)+1 "total number of extents" from dba_extents
where segment_type='TABLE' and owner='XXX' and segment_name='<tablename>' group by segment_name;

Hope this will help!

Winnie =>

Shuang Li wrote in message ...
>Hi everybody,
>
>Could anyone out there tell me how I can find out the total number of
>extents for a specific table? I know how for a specifc tablespace. But
>can't find a dba table containing the total number of extents and a table
>name. Basically what I want to do is to locate those tables who have too
>many extents and rebuild their indexes.
>
>Any suggestions will be greatly appreciated !!
>
>Thanks a lot!
>
>Shuang
>
> ******************************************************
> * *
> * NOTHING AGES AS FAST AS HAPPINESS *
> * --- Les Miserables *
> * *
> ******************************************************
> http://www.cs.umbc.edu/~sli1 410-455-3082(O)
>
>
>
Received on Tue Jun 30 1998 - 23:46:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US