Re: "Transactions are bad, real bad" - discuss

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Fri, 2 May 2003 11:34:45 -0700
Message-ID: <iZysa.12$rv3.138_at_news.oracle.com>


"Paul Vernon" <paul.vernon_at_ukk.ibmm.comm> wrote in message news:b8to09$2178$1_at_gazette.almaden.ibm.com...

> 12:15 is some arbitrary time after the auction closes and after the row
was
> committed.

OK. For the auction closed at 12:00 organizer wants to query at 12:15 (or any time for that matter) and to know what bids were comitted before 12:00.

> Maybe you need to try it in your favourite DBMS. I don't have Oracle, so
can
> only simulate it's AS OF function:

The problem is that "flashback" uses history log that is recording *all* the events, even for transactions that were rollbacked. If you try simulating this with triggers, a user can still rollback transaction so that the record would be lost. Then, no wonder that you can't reproduce a consistent picture what Bid Auction state was as of 12:00.

I think you have to use autonomous transaction inside the trigger in order to correctly simulate "flashback".

> Practically, I cannot use a 'flashback' query if I want to know say the
> average max bid for auctions during the past year. In your scheme I would
have
> to query each auction row AS AT the end time of each auction, and only
then do
> my yearly average calculation...

That is easy: AS OF state can simply be archieved to the other table. Received on Fri May 02 2003 - 20:34:45 CEST

Original text of this message