Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are planning to run the following space management command:

alter table XXX shrink space cascade

on a production database (Oracle 10g). The XXX table is a transactional table heavily used for updates/inserts/deletes by many applications.

I am wondering if running the shrink command during the peak time (online) will cause a severe performance degradation, or may lock the table and so block all the applications?

Can you clarify the impact of the shrink command on the access to the databese table XXX?

share|improve this question

migrated from May 25 '13 at 7:49

This question came from our site for professional and enthusiast programmers.

Regardless of whether it's safe or not, don't do segment administration during peak hours. That's just not a good practice at all. – Mat May 25 '13 at 8:04

As I understand it the resizing of the high water mark requires an exclusive table lock, which in theory might not be a problem as it would be of very short duration. However if it has to wait on other transactions before it gets the lock it will block other transactions.

However as the docs point out, you could run a shrink space compact, which does not move the HWM, and run the shrink later on when the system is known to be quiet:

share|improve this answer
Nice answer +1 @David Aldridge – jim mcnamara May 24 '13 at 19:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.