Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Getting current space of a table ...
This is rather an expensive way of getting one possible
approximation. A much more efficient method is to
use one of the Oracle-supplied packages to find the
high-water-mark and free-list size directly. I think I've
put a sample on my web-site which should get you going.
--
Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk
Ari Kaplan wrote in message <922208075.043.75_at_news.remarQ.com>...
>Thomas,
>
>In Oracle7, to find out the total blocks of a table that contain rows,
enter
>the following SQL
>
>SELECT COUNT(DISTINCT(SUBSTR(ROWID,1,8))) FROM table_name;
>
>In Oracle8, you can find the total blocks using DBMS_ROWID:
>
>SELECT COUNT(DISTINCT(SUBSTR(DBMS_ROWID.ROWID_TO_RESTRICTED(ROWID),1,8)))
>FROM table_name;
>
Received on Tue Mar 23 1999 - 13:49:00 CST