Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

impact to production if I shrink space on table...

User_UOVAAFeb 19 2013 — edited Feb 19 2013
Hello experts.

I am running Oracle 11.2 and saw in OEM that I have a table that is candidate for shrinking space.
According to OEM, I can gain 5G by shrinking the table.
The table is 16G, so if I shrink the table, then it should reduce to approx. 11G, right?
This table is the primary table used by our application, so impact to production is very important.

Okay, so I'm wondering what the impact to production is on the table while I shrink the space on the table.
I am testing it now in my test environment.
First, I found I had a function based index which has to be dropped before I can shrink the table.
So I ran dbms_metadata to get the syntax to recreate the FBI, then dropped the FBI.

Next, i ran alter table owner.tablename enable row movement;
Then, I ran alter table owner.tablename shrink space cascade;

While I am running the shrink table command, I opened another session and I queried the table and even did updates on the table.
I was quite surprised in that the table is not locked and is still accessible for update and select statements.
In fact, I do not see any noticeable impact by the shrink table command.
Obviously, I am not in the production environment with hundreds of concurrent users, but my question is what kind of impact should I expect to see if I do this in production with people hitting this table? (No, this is not an IOT.)

Any ideas?

Edited by: 974632 on Feb 19, 2013 5:54 AM

NOTE: The table shrink command took: Elapsed: 00:43:17.19
Recreating the function based index took: Elapsed: 00:00:28.80
This post has been answered by Fran on Feb 19 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 19 2013
Added on Feb 19 2013
15 comments
5,009 views