DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Calculating HWM

  1. #1
    Join Date
    Jul 2006

    Calculating HWM

    Can anyone clarify me the following doubts?
    A table size is 2M. After deleting some rows(1M), the size is still 2M.
    After moving the table to different tablespace, the size is reduced to 1M, why?
    How can measure the size of a table without calculating its high water marks spaces?



  2. #2
    Join Date
    Aug 2002
    Colorado Springs
    When you delete rows from a table Oracle just writes to the affected blocks that contain the rows, it doesn't re-pack the remaining rows into as few blocks as possible at the "begining" of the segment and adjust the HWM, as that would represent a relatively large use of resources that would probably be wasted anyway. The assumption made by Oracle is that the spaces in the blocks will later be re-used by the insertion of new rows (or maybe the expansion of existing ones). There is also a general philosophy in Oracle to never do now what could be put-off until later, and this approach is in accordance with that.

    You can estimate the real space utilisation of the table by analyzing it with DBMS_STATS and multiplying the number of rows by the average row length, then adding a little overhead.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.