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

Home -> Community -> Usenet -> c.d.o.tools -> Re: materilized view maintenance

Re: materilized view maintenance

From: Martin Drautzburg <drautzburg_at_altavista.net>
Date: 10 Apr 2001 21:56:30 +0200
Message-ID: <87n19oedg1.fsf@altavista.net>

"Loki" <rinze_cats_at_hotmail.com> writes:

> 2. What would this trigger look
> like in PL/SQL?

A trigger that fires every 100 rows ? Tricky. Needs to have some sort of memory.

This could basically work:

You original table gets a column "sequence_num" that gets incrementd with every insertion. Chances are, you already have such a column. When you refresh your materialized view you have to remeber the last sequence_num that made it SOMWHERE. I think the only possible place is another database table, because anything session specific won't do.

Whenever you isert a new row, the trigger would compare the current sequence_num with SOMEWHERE.sequence_num and if the two are more than 100 apart, triggers the refresh of the M.V. Received on Tue Apr 10 2001 - 14:56:30 CDT

Original text of this message

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