On Jul 12, 2001 at 12:10:25AM, Vladimir Begun wrote:
> on Jul 11, 2001 at 11:30:18PM, Chuan Zhang wrote:
> > Hi, DBA gurus,
> >
> > Recently, I will archiving some big tables. How to find free space under
> > HWM for a table?
>
> Do analyze and then you can calculate it:
>
> dba_segments.blocks - dba_tables.empty_blocks - 1
>
> Be aware the blocks which are below HWM can be empty
> because of preallocation or delete activities.
A way to calculate number of really used blocks (for 8+):
SELECT COUNT(DISTINCT
DBMS_ROWID.ROWID_BLOCK_NUMBER(rowid)
|| DBMS_ROWID.ROWID_RELATIVE_FNO(rowid)
)
FROM schema.table;
SELECT COUNT(DISTINCT SUBSTR(rowid, 1, 15)) FROM schema.table;
--
Vladimir Begun | I expect people to expect Perl to do the
http://vbegun.net/ | right thing.
http://vbegun.net/wap/ | -- Larry Wall in
[EMAIL PROTECTED] | <[EMAIL PROTECTED]>
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Vladimir Begun
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).