Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Move table online and update the indexes at the same time.

Re: Move table online and update the indexes at the same time.

From: Tanel Põder <tanel.poder.003_at_mail.ee>
Date: Tue, 27 Jul 2004 12:44:56 +0300
Message-ID: <3a8a01c473be$62b81c30$0a879fd9@porgand>


> By the way, when is the lock required - in the beginning or in the end?

I've not tested it, but probably in the end, when you switch your newly created table instead of the old one.

> I move the table for several reasons:
> 1.) CREATE TABLE ... AS SELECT produces the table which is much smaller
> (sometimes 2-3 times). We are trying to reduce the space usage with it. So
> it seems the tables are space.

This seems to be an issue of incorrectly configured PCTFREE and PCTUSED. If you analyzed the table over time and checked the average free space in blocks (and rowcounts+rowlens) you might get closer whats the real issue here. In default configuration the tables PCTUSED is 40 for example, meaning that up to 60% of the block contents may remain empty and completely unused if the space usage doesn't fall below PCTUSED...

> 2.) Change storage clause - FREELIST, FREELIST GROUP or move to ASSM (not
> sure, because it seems there are several bugs that we might hit in our
> environment)

You can change FREELISTS online without reorg. You shouldn't normally use FREELIST GROUPS if you're not in OPS or RAC evnironment. Freelist groups have the problem, that the processes which PID's map to another freelist group, don't see free blocks in other freelist groups, thus potentially wasting space in DML intensive environment. So if you're not seeing heavy segment header block contention due freelist updates in your database, you shouldn't consider freelist groups (and even if you see, then there are other alternatives to consider, like partitioning, etc.)

ASSM - again don't move to it if you don't have a RAC environment (with continuously changing number of nodes) or you don't have special conditions like having rows with extremely varying sizes inserted to your table etc..

> 3.) Physical layout reorganization. Some tables are in wrong tablespaces.

This doesn't seem like a serious problem, given that your databases availability is more important (unless you don't have serious bottlenecks due improperly balanced IO)

Tanel.



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Tue Jul 27 2004 - 04:41:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US