Shrink table space strategy

  • From: Eriovaldo Andrietta <ecandrietta@xxxxxxxxx>
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Sun, 2 Jan 2022 23:11:16 -0300

Hello,

I have big tables with millions of lines in the production environment ...
We have a request to delete old data in these tables. The filter will be
defined by the business rules, considering data and some status ...
Partition is  an option but not at this moment. Business rules are complex
to define the best partition and tables are too many (+-150).

Considering that shrink table causes lock in the table, what is the best
strategy :

a.) delete a lot of lines, rebuild indexes (the maximum is possible) and
execute shrink a few times
b.) delete few lines and execute shrink many times and rebuild indexes few
times.
c.) are there other ways to do it ???


I did not find how to execute the shrink online without lock.

Regards
Eriovaldo

Other related posts: