Skip to Main Content
  • Questions
  • Is there a way to know free vs used extend to initiate a table rebuild

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Simon.

Asked: June 20, 2019 - 1:55 pm UTC

Last updated: June 20, 2019 - 3:07 pm UTC

Version: 11.2.0.4.0

Viewed 1000+ times

You Asked

Good afternoon,

During a life cycle of a table, it grows (insert) and reduces (delete) in terms of row counts but it term of space this is not the case.

My understanding is when you delete rows, the free blocks/extends aren't release and can be used later if new rows are inserted.

Those 'unused' blocks are still scanned during a table scan which are useless. One solution to get rid off of those unneeded reads is to rebuild the object.

Hence I'm looking a way (SQL statement, report) that will tell me or give hints if a table should be rebuild, for example number of free/used extents per segment (in my case I have one segmet per table) or number of free/used extents per datafile per segment.

Is my approach correct?

Thanks in advance

Simon


and Chris said...

The segment space advisor is a good place to start. This details the reclaimable space in a table. And the command to do it!

Connor has a demo over this over at https://connor-mcdonald.com/2019/05/31/advice-on-fragmentation-and-shrinkage/

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database