Skip to main content
Version: v3

When Use View & Materialized View

View & Materialized View concept

In Canner Enterprise, Data Team can open the Workspace to do data modeling to generate View or Materialized View. Materialized views are to convert the data into an application-ready data set as a snapshot so that data consumers such as BI users can update BI reports and data analysts using Python or R.

View

In Canner Enterprise's View, you can also think of it as the View when we operate the Database. We can directly convert the execution SQL of different databases into a SQL View and then use the View to perform operations such as Join with other Tables.

See more Operation of View

Materialized View

If you have experience using relational databases such as PostgreSQL and Oracle, you may have heard of Materialized View more or less. Simply put, Materialized View will materialize the results of SQL Query. The most common use is to improve query performance. In the Materialized View of Canner Enterprise, you can also think of it as the Materialized View when we operate the Database, that is, when we generally use the database, when you want the "pre-computation" results store in a new Table.

In Canner Enterprise, the Materialized View will occupy a persistent space in the Storage. If we can use the Materialized View to create a snapshot of some time-consuming and complex query results, we can save the time and cost of going back to the data source every time by querying the Materialized View. , For example, we obtain business data through Oracle, and PostgreSQL by joining several tables. If such a query is used frequently but can be more real-time, it can update once daily instead of obtaining data from Oracle and PostgreSQL whenever used. It is better to set a Scheduled Materialized View, execute it once daily, and materialize the data so users can use it regardless of subsequent queries or concurrent needs.

How to use Materialized View:

  1. Pre-computing results, allowing end users to obtain data in their applications quickly
  2. Use Materialized View to pre-calculate commonly used reports, and subsequent users can use them directly without repeated calculations.
  3. You can schedule a fixed time to update the Materialized View to generate subsequent usage reports.
Partitions

The current limit is only 100 Partitions

See more Operation of Materialized View