US 12,277,115 B2
Sharing materialized views in multiple tenant database systems
Prasanna Rajaperumal, Bangalore (IN); Thierry Cruanes, San Mateo, CA (US); Allison Waingold Lee, Pebble Beach, CA (US); Igor Demura, Mountain View, CA (US); Jiaqi Yan, Menlo Park, CA (US); and Benoit Dageville, San Mateo, CA (US)
Assigned to Snowflake Inc., Bozeman, MT (US)
Filed by Snowflake Inc., Bozeman, MT (US)
Filed on Sep. 8, 2023, as Appl. No. 18/463,904.
Application 18/463,904 is a continuation of application No. 16/831,000, filed on Mar. 26, 2020, granted, now 11,914,591.
Application 16/831,000 is a continuation of application No. 16/428,395, filed on May 31, 2019, abandoned.
Prior Publication US 2023/0418818 A1, Dec. 28, 2023
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 16/00 (2019.01); G06F 7/00 (2006.01); G06F 16/2453 (2019.01)
CPC G06F 16/24539 (2019.01) 18 Claims
OG exemplary drawing
 
1. A method comprising:
storing a source table associated with a provider account, the source table including at least one micro-partition and stored across one or more of a plurality of shared storage devices in a multiple tenant database system, and wherein the at least one micro-partition is an immutable storage object;
generating, by one or more execution nodes allocated to the provider account, a materialized view from underlying data in the source table;
storing the materialized view in cache storage allocated to the provider account separate from the plurality of shared storage devices;
providing access to the materialized view to a receiver account;
updating, by the provider account, the source table including deleting at least one micro-partition based on execution of a transaction and inserting at least one new micro-partition;
receiving, from the receiver account, a query directed at the materialized view;
identifying modifications to the source table not reflected in the materialized view by executing a merge command between the source table and the materialized view;
in response to merging the source table and materialized view, scanning the source table to detect the insertion of the at least one new micro-partition in the source table but not present in the materialized view;
in response to merging the source table and materialized view, scanning the materialized view to detect the deletion of the at least one micro-partition found in the materialized view but not present in the source table;
updating the materialized view based on detecting the at least one new micro-partition and detecting the deletion of the at least one micro-partition;
executing the query based on the updated materialized view; and
providing access to the updated materialized view to the receiver account for query processing and restricting the receiver account from accessing the update to the underlying data in the source table.