-
Calculating HWM
Can anyone clarify me the following doubts?
A table size is 2M. After deleting some rows(1M), the size is still 2M.
Why?
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?
Thanks&Cheers
BEERSA
-
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|