DBMS_SNAPSHOT or DBMS_MVIEW

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
User avatar
bessa_lucas
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Fri, 17 Oct 2014 3:02 pm
Lucas Bessa
Analista de Sistemas

lucas.bessa@obers.com.br
lucas.bessa.ti@gmail.com

Personal has two doubts about materialized view

When should I use dbms_snapshot or dbms_mview?

Because from what I read, the two update the same way Materialized View.

The second question is, I have some materialized view that should run from the period 00:00 at 06:00. The problem is that some are extrapolating it.

Would you like to update only one period? This table picks up old drives, so I wanted to update only the last 2 years. How to do this?
User avatar
adrianoturbo
Moderador
Moderador
Posts: 393
Joined: Thu, 20 Mar 2008 4:09 pm
Location: Brasília
Adriano Alves
---Para cada problema dificil existe uma solução simples.----

Brother, DBMS_MVIEW is a DBMS_SNAPSHOT Synonym, so we are talking about the same update feature of
Materialized Views manual.
As for the issue of the run period: it would be interesting to check the type of update that is being made if it is incremental or complete.
Everything brings to believe that it should be complete to be demanding so long.
Ideally would work with incremental updates as it is faster than complete.
The complete update problem is that it does the whole process of rebuilding materialized views and this makes it time, already the incremental update eliminates the possibility of having to rebuild materialized views.
User avatar
bessa_lucas
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Fri, 17 Oct 2014 3:02 pm
Lucas Bessa
Analista de Sistemas

lucas.bessa@obers.com.br
lucas.bessa.ti@gmail.com

Adriano,

Thanks for the return

and how do I do this incremental update?
User avatar
adrianoturbo
Moderador
Moderador
Posts: 393
Joined: Thu, 20 Mar 2008 4:09 pm
Location: Brasília
Adriano Alves
---Para cada problema dificil existe uma solução simples.----

Brother, just rotate the command below:

Select all

 
SQL> execute DBMS_SNAPSHOT.REFRESH( 'Sua_Materialized_View','f'); 
For knowledge in the execution of the procedure The F parameter, means incremental update.
If it were a complete update would use the letter C, as in the example below:

Select all

 
SQL> execute DBMS_SNAPSHOT.REFRESH( 'Sua_Materialized_View','c'); 
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests