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: table reorganizations

RE: table reorganizations

From: <chris_at_thedunscombes.f2s.com>
Date: Mon, 12 Jan 2004 02:14:25 -0800
Message-ID: <F001.005DC6EB.20040112021425@fatcity.com>


Niall,

In the first case disk space was the primary reason, performance improvement being a positive side-affect, so as to avoid a major disk array upgrade. I know that new inserts would use the deleted space in the pruged tables. However that free-space within the table block isn't very flexible i.e. it can only be used for inserts into the particular table. After the reorg the space is available to all objects in the tablespace and in our case as we moved the tables to new tablespaces we were also able to reduce the size of the tablespaces, therefore gving the space back as the OS level where it can be allocated to any tablespace in the future.

In the second the "table-swap" was first implemented under Oracle 7 so alter table move wasn't available.

I hope this explains the reasoning.

Chris

Quoting Niall Litchfield <niall.litchfield_at_dial.pipex.com>:

> 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
>
> Cheers
>
> Niall
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Niall Litchfield
> INET: niall.litchfield_at_dial.pipex.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (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).
>

Chris Dunscombe

chris_at_thedunscombes.f2s.com



Everyone should have http://www.freedom2surf.net/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: chris_at_thedunscombes.f2s.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (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 Mon Jan 12 2004 - 04:14:25 CST

Original text of this message

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