title: Free Space in Table
body: <p>we have a table with over 500,000,000 row in it.   So, did some maintenance and moved some of those records elsewhere.    What I'm curious about is how much space is available in that table now that more than 1/2 of the rows have been deleted.   When I look in the dictionary, it still shows 18GB, of which there must be a lot of room unallocated now.</p>
  <p>I tried running DBMS_SPACE:</p>
  <pre><code>VARIABLE total_blocks NUMBER
  VARIABLE total_bytes NUMBER
  VARIABLE unused_blocks NUMBER
  VARIABLE unused_bytes NUMBER
  VARIABLE lastextf NUMBER
  VARIABLE last_extb NUMBER
  VARIABLE lastusedblock NUMBER
  exec DBMS_SPACE.UNUSED_SPACE('CUSTOMER', 'LOGIN_LOG', 'TABLE', :total_blocks, :total_bytes,:unused_blocks, :unused_bytes, :lastextf, :last_extb, :lastusedblock);
  </code></pre>
  <p>However, the FREE_SPACE item is NULL:</p>
  <pre><code>SQL&gt; print
    FREE_BLOCKS
    -----------
  
    TOTAL_BLOCKS
    ------------
       2436608
  
    TOTAL_BYTES
    -----------
       1.9961E+10
  </code></pre>
  <p>So, just wondering if I am missing something, or there is a different way of doing this?</p>