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: Batch update of a critical table

Re: Batch update of a critical table

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Sat, 25 Sep 1999 18:43:38 +0800
Message-ID: <37ECA75A.51AD@yahoo.com>


Ravi Pinto wrote:
>
> Hello world,
>
> This is my first posting to any Oracle newsgroup.
> Therefore , if it is not appropriate here, please
> let me know where I should post.
>
> Situation.
> ----------
> A rate table with 22 million records needs to be
> updated periodically. The records would be read
> from a flat file.
>
> Problem.
> --------
> The application using the rate table is a mission
> critical app, with 24 x 7 x 365 (366 ???) uptime.
> People from world over would be using it.
> Therefore, the updates should happen fast.
>
> Solutions.
> ----------
> Solution 1. Load the records into a new table and
> after the load is over, rename original table to
> something else, rename new table to rate table and
> continue.
> Question :
> a. How fast would this be ???
> b. Does rename obtain exclusive lock on tables ??
>
> Soultion 2. Maintain 2 sets of rate tables, say R1
> and R2. Designate R1 as current rate table and R2
> as backup table. Load records into R2. After load
> is over, update app specific parameter table with
> some sort of record signifying that R2 is now current
> rate table. The app querying the rate table decides
> on which table to use by first querying the parameter
> table.
> a. Sounds logical ???
> b. Any concerns.
>
> Any other solutions that you are already using ???
> Currently we are tending towards the second solution.
> However, I think it is better to ask people who may
> already have handled this.
>
> Thanks for listening,
> and TIA,
> Ravi...
> --
> Ravi Pinto, Bombay, India.
> mailto:ravipinto_at_my-dejanews.com
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

To improve your second solution, why not just use views...

create view RATE
as select * from RATE_NO1;

then load RATE_NO2 as required, then

create or replace view RATE
as select * from RATE_NO2;

All the apps just use "RATE" ...
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Sat Sep 25 1999 - 05:43:38 CDT

Original text of this message

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