Translate

Table Vs. Materialized View


  • One of the biggest benefit of using a materialized view is that Oracle takes care of keeping the data in sync. If you have a separate aggregate table, you are responsible for keeping the data synchronized. That generally requires a reasonable amount of code and a decent amount of testing and most organizations manage to make mistakes that leave holes that cause the aggregate table to get out of sync. This is particularly true when you try to implement incremental refreshes of the aggregate table.
  • Another major benefit is that, depending on the settings, Oracle can use query rewrite to use materialized views when users issue queries against base tables. So, for example, if you have a bunch of existing reports against a detail table that produce daily, monthly, and yearly aggregate results, you can create a materialized view on the base table that aggregates the data at a daily level and the optimizer can utilize that materialized view for all your existing queries. This makes it much easier to optimize reporting workloads in a data warehouse without trying to go and rewrite dozens of reports to use your new aggregate table or to mess with DBMS_ADVANCED_REWRITE to force your own rewrites of the queries.


·       The Source Data is Simple and easy to Query.

·      The source Data changes very quickly, or can be accessed without using View. In such cases we Creating Views should be avoided.

·    Consistency is a high priority. The Views may not always be fully consistent with the original Data.

1 comment:

  1. A Blockchain AI Software Development Company is a specialized technology firm that combines the power of blockchain and artificial intelligence to create innovative software solutions. These companies are experts in developing applications and platforms that leverage blockchain technology for secure and transparent data management, while harnessing AI for intelligent automation, data analysis, and predictive capabilities. They offer custom software development services tailored to the unique needs of businesses looking to explore the potential of blockchain and AI, paving the way for cutting-edge, decentralized, and intelligent digital solutions.

    ReplyDelete