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 -> Question on tablespaces and table spaces

Question on tablespaces and table spaces

From: Simon Goland <sg_at_mda.ca>
Date: 1997/04/16
Message-ID: <335540BA.77AE@mda.ca>#1/1

I think I am just being overly confused about something trivial...

As an example (on a conceptual level and not any specific semantics), say I have a tablespace TEST of 50 MB, empty. So I have 50 MB free. Now I create one table in this tablespace using something like:

CREATE TABLE abc (

...

   <fields>
...

)
TABLESPACE test
STORAGE (
   INITIAL 40,000,000
...

);

Now, if I use Server Manager or any query to show me the free space in tablespace TEST, it will report only 10 MB free for the tablespace (approximately, to the nearest block size). Correct?

Then, if after I insert some rows into my table ABC, I want to know how much free space do I have left in the table, I can ran

  analyze table abc estimate statistics;

followed by

  select t.blocks        "Used blocks",
         t.empty_blocks  "Free blocks",
         s.blocks        "Total blocks"
    from dba_tables    t,
         dba_segments  s
   where t.owner = '<my user name>'
     and s.owner = t.owner
     and t.table_name = 'ABC'
     and s.segment_name = 'ABC';


Which will give me the free/used/total table space, in blocks.

Am I correct?

-- 
[ Simon Goland       B-)>     sg_at_mda.ca ]
[   Without action there is no change   ]
Received on Wed Apr 16 1997 - 00:00:00 CDT

Original text of this message

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