Incremental maintenance of query results

    公开(公告)号:US11762855B1

    公开(公告)日:2023-09-19

    申请号:US17931590

    申请日:2022-09-13

    Applicant: Snowflake Inc.

    CPC classification number: G06F16/24539 G06F7/14 G06F16/24542

    Abstract: Provided herein are systems and methods for a database object (e.g., materialized table) configuration including using the database object for incremental maintenance of query results. For example, a method includes creating a materialized table using a table definition. The table definition includes a query on one or more base tables and a lag duration value. The lag duration value indicates a maximum time period that a result of a prior refresh of the query can lag behind a current time instance. A delta set for the one or more base tables is determined. The delta set includes at least one change applied to the one or more base tables since the prior refresh of the query. The delta set is merged with the materialized table to perform an incremental update of the materialized table.

    TRANSIENT MATERIALIZED VIEW REWRITE

    公开(公告)号:US20230087933A1

    公开(公告)日:2023-03-23

    申请号:US18059125

    申请日:2022-11-28

    Applicant: Snowflake Inc.

    Abstract: Queries executed against a materialized view can execute up to orders of magnitude faster than equivalent queries on a source (or base) table. However, although a query can reference a materialized view directly, a user (e.g., query author) may not know about a relevant materialized view. Moreover, if a source table has multiple materialized views generated, the user may not know which materialized view to reference in the query. Thus, embodiments of the present disclosure provide techniques for automatically rewriting queries directed to a source table to utilize existing materialized views.

    Selecting partitions for reclustering based on distribution of overlapping partitions

    公开(公告)号:US11544244B2

    公开(公告)日:2023-01-03

    申请号:US17654296

    申请日:2022-03-10

    Applicant: Snowflake Inc.

    Abstract: Disclosed herein are embodiments of systems and methods for selecting partitions for reclustering based on distribution of overlapping partitions. In an example, a database platform makes a determination to at least partially recluster a database table that includes data stored across a plurality of partitions. The database platform responsively selects a subset of the partitions. The selecting of the subset includes identifying a point on a domain of a clustering key that corresponds to a local maximum of overlapping partitions, and also includes selecting the subset from among a group of overlapping partitions. The group includes at least one partition that overlaps the identified point on the domain of the clustering key. Each partition in the selected subset is above a reduction goal of overlapping partitions. The database platform at least partially reclusters the selected subset based on the clustering key.

Patent Agency Ranking