Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: table reorganizations

RE: table reorganizations

From: Niall Litchfield <>
Date: Fri, 09 Jan 2004 12:24:27 -0800
Message-ID: <>

Hi Chris
> Richard,
> I agree there are a number of reasons for reorganising
> tables. LMTs remove the
> need to reorganise a tablespace but not to reorganise a
> table. Two further real- ilfe examples of table reorgs:
> 1) The purge programs have at last been written and run
> deleting data > 2 years
> old. The system's been running for 4 years. So in simple
> terms most of the
> tables are approx 50% empty. You need to reorg in this case.

What would be the rationale for this? If the rationale is performance how much faster does it make everything, and how many users are complaining to start with? If purely for space management purposes then I'd ask why the deleted space could not be reused?

> 2) A "transaction log" table is inserted to throughout the
> day and most of the
> night. A clear down processing job runs at the end of the day
> and deletes all
> the rows its processed, but more rows are being added. So the
> table is now < 1%
> full. Not good for FTS. So instead of a conventional reorg we
> implemented a
> nightly "table-swap". This meant locking the source table,
> copying it's
> contents to a replica empty single extent table, target
> table. The names of the
> target and source tables are swapped, hence "table-swap". The
> new source table
> is now available to the application and the original source
> is truncated and
> ready to be the target in 24 hrs time.

Pah. Once a day indeed. Once every 5 minutes... I'm interested in why you implemented "table swap" instead of 'alter table move' which is what we did.

> Cheers,
> Chris Dunscombe



Please see the official ORACLE-L FAQ:
Author: Niall Litchfield

Fat City Network Services    -- 858-538-5051
San Diego, California        -- Mailing list and web hosting services
To REMOVE yourself from this mailing list, send an E-Mail message
to: (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Jan 09 2004 - 14:24:27 CST

Original text of this message