Incremental refresh of a materialized view

US2020133937A1 · US · A1

Patent metadata
FieldValue
Publication numberUS-2020133937-A1
Application numberUS-201916662645-A
CountryUS
Kind codeA1
Filing dateOct 24, 2019
Priority dateOct 26, 2018
Publication dateApr 30, 2020
Grant date

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Systems, methods, and devices for incrementally refreshing a materialized view are disclosed. A method includes generating a materialized view based on a source table. The method includes merging the source table and the materialized view to generate a merged table to identify whether an update has been executed on the source table that is not reflected in the materialized view. The method includes, in response to detecting an update made to the source table that is not reflected in the materialized view, applying the update to the materialized view.

First claim

Opening claim text (preview).

What is claimed is: 1 . A system comprising: a compute service manager for managing internal operations of a cloud-based database platform; a plurality of shared storage devices collectively storing database data, wherein the plurality of shared storage devices is independent of the compute service manager; and an execution platform comprising a plurality of execution nodes, wherein the execution platform independent is independent of the plurality of shared storage devices and the compute service manager; wherein the compute service manager is configured to: generate a materialized view based on a source table; merge the source table and the materialized view to generate a merged table to identify whether an update has been executed on the source table that is not reflected in the materialized view; and in response to detecting an update made to the source table that is not reflected in the materialized view, assign tasks to one or more execution nodes of the execution platform to apply the update to the materialized view. 2 . The system of claim 1 , wherein the update comprises one or more of: one or more rows inserted into the source table; one or more rows deleted from the source table; or one or more rows updated in the source table. 3 . The system of claim 1 , wherein the compute service manager is configured to assign tasks for applying the update to the materialized view by: in response to determining a new row has been inserted into the source table, assign a task to refresh the materialized that comprises inserting the new row into the materialized view; and in response to determining a row has been deleted from the source table, assign a task to compact the materialized view that comprises deleting the row from the materialized view. 4 . The system of claim 3 , wherein the compute service manager is configured to prioritize inserting the new row into the materialized view over deleting the row from the materialized view. 5 . The system of claim 3 , wherein the compute service manager is configured to assign a task to compact the materialized view only after a plurality of rows have been deleted from the source table such that a quantity of the plurality of rows exceeds a predetermined threshold number of deleted rows. 6 . The system of claim 1 , wherein the source table is organized into a plurality of micro-partitions, and wherein the update comprises one or more of a new micro-partition being added to the source table or a micro-partition being deleted from the source table. 7 . The system of claim 1 , wherein the compute service manager is further configured to scan the merged table to detect one or more modified micro-partitions in the source table by: identifying whether a new micro-partition has been inserted into the source table that is not present in the materialized view; or identifying an absence of a deleted micro-partition removed from the source table that is still present in the materialized view. 8 . The system of claim 1 , wherein the compute service manager is further configured to redirect queries away from the materialized view and to the source table while the update is being applied to the materialized view. 9 . The system of claim 1 , wherein the compute service manager is further configured to generate a source table log comprising: a log of one or more rows inserted into the source table since a last refresh of the materialized view; and a log of one or more rows deleted from the source table since a last compaction of the materialized view. 10 . The system of claim 1 , wherein the compute service manager is further configured to generate cost statistics for the materialized view comprising one or more of: a number of micro-partitions on the source table that have been materialized; a total number of partitions on the source table; a total number of partitions of the materialized view; a number of times a query is accessed on the materialized view; or a number of times a query is accessed on the source table. 11 . A method comprising: generating a materialized view based on a source table; merging the source table and the materialized view to generate a merged table to identify whether an update has been executed on the source table that is not reflected in the materialized view; and in response to detecting an update made to the source table that is not reflected in the materialized view, applying the update to the materialized view. 12 . The method of claim 11 , wherein the update comprises one or more of: one or more rows inserted into the source table; one or more rows deleted from the source table; or one or more rows updated in the source table. 13 . The method of claim 11 , wherein applying the update to the materialized view comprises: in response to determining a new row has been inserted into the source table, refreshing the materialized view by inserting the new row into the materialized view; and in response to determining a row has been deleted from the source table, compacting the materialized view by deleting the row from the materialized view. 14 . The method of claim 13 , wherein refreshing the materialized view by inserting the new row into the materialized view is prioritized over compacting the materialized view by deleting the row from the materialized view. 15 . The method of claim 13 , wherein compacting the materialized view occurs only after detecting a plurality of rows deleted from the source table such that a quantity of the plurality of rows exceeds a predetermined threshold number of deleted rows. 16 . The method of claim 11 , wherein the source table is organized into a plurality of micro-partitions, and wherein the update comprises one or more of a new micro-partition being added to the source table or a micro-partition being deleted from the source table. 17 . The method of claim 11 , further comprising scanning the merged table to detect one or more modified micro-partitions in the source table by: identifying whether a new micro-partition has been inserted into the source table that is not present in the materialized view; or identifying an absence of a deleted micro-partition removed from the source table that is still present in the materialized view. 18 . The method of claim 11 , further comprising redirecting queries away from the materialized view and to the source table while the update is being applied to the materialized view. 19 . The method of claim 11 , further comprising generating a source table log comprising: a log of one or more rows inserted into the source table since a last refresh of the materialized view; and a log of one or more rows deleted from the source table since a last compaction of the materialized view. 20 . The method of claim 11 , further comprising generating cost statistics for the materialized view comprising one or more of: a number of micro-partitions on the source table that have been materialized; a total number of partitions on the source table; a total number of partitions of the materialized view; a number of times a query is accessed on the materialized view; or a number of times a query is accessed on the source table. 21 . A processor that is configurable to execute instructions stored in non-transitory computer readable storage media, the instructions comprising: generating a materialized view based on a source table; merging the source table and the materialized view to genera

Assignees

Inventors

Classifications

  • Updating materialised views · CPC title

  • Querying · CPC title

  • Data partitioning, e.g. horizontal or vertical partitioning · CPC title

  • Ensuring data consistency and integrity · CPC title

  • Tablespace storage structures; Management thereof · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US2020133937A1 cover?
Systems, methods, and devices for incrementally refreshing a materialized view are disclosed. A method includes generating a materialized view based on a source table. The method includes merging the source table and the materialized view to generate a merged table to identify whether an update has been executed on the source table that is not reflected in the materialized view. The method incl…
Who is the assignee on this patent?
Snowflake Inc
What technology area does this patent fall under?
Primary CPC classification G06F16/2393. Mapped technology areas include Physics.
When was this patent published?
Publication date Thu Apr 30 2020 00:00:00 GMT+0000 (Coordinated Universal Time) (A1). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 1 related publication on this page (citations in our corpus or others sharing the same primary CPC).