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

Home -> Community -> Usenet -> c.d.o.server -> Re: How best to shift periodic column data in a VLDB

Re: How best to shift periodic column data in a VLDB

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 9 Feb 2000 23:23:34 -0000
Message-ID: <950139955.27650.0.nnrp-14.9e984b29@news.demon.co.uk>

Split the table vertically into:

    Amount table
    Reference table
Set up a one to one meaningless key.
Create a join view to let users see the data

Create new amounts table as
select from old amounts table.

various other options exist - but it
would help if you mentioned the
version of Oracle.

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk

Kurt Johnson wrote in message ...
>Problem:
>You have a VLDB with a number of tables that require a weekend batch
process
>to shift data. These tables have amount columns (WK1, WK2, ...or MTH_AMT1,
>MTH_AMT2, MTH_AMT3...) for the periods they cover. As periods change, you
>need to roll off the first column and move all the other ones over one.
>(i.e., AMT2's value will be places in AMT1, WK2 will move to WK1, etc.).
>Don't worry about the last column. It's not essential to our problem.
>
>Considerations:
>There are millions of records in some of the involved tables -- this will
be
>an involved process
>This process will occur weekly and monthly -- it can't take all weekend
>You don't want to fragment your tablespaces with the update -- your disk
>space is large, but not unlimited
>
>Your choices are:
>Updating the table in place, fragmentation and speed be damned.
>Create a new table based on a select of the original table, and reapply all
>indexes, constraints, triggers, synonyms, and grants as necessary.
>Some other unmentioned method
>
>What is the preferred method?
>
>BTW, I am thinking create a new table for each then reapplying indexes,
etc.
>after the fact.
>
>Thanks,
>Kurt
>
>
>
Received on Wed Feb 09 2000 - 17:23:34 CST

Original text of this message

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