PIPELINE LEVEL OPTIMIZATION OF AGGREGATION OPERATORS IN A QUERY PLAN DURING RUNTIME

    公开(公告)号:US20210089535A1

    公开(公告)日:2021-03-25

    申请号:US16857817

    申请日:2020-04-24

    Applicant: Snowflake Inc.

    Abstract: The subject technology receives a query plan, the query plan comprising a set of query operations, the set of query operations including at least one aggregation and a join operation, the join operation including a build side and a probe side. The subject technology inserts an aggregation operator below the probe side of the join operation. The subject technology causes the build side of the join operation to generate a hash table. The subject technology causes the build side of the join operation to generate a bloom filter based at least in part on the hash table and provide information, corresponding to properties of the build side, to a bloom filter. Based at least in part on the information, the subject technology determines at least one property of the join operation to determine whether to switch the aggregation operator to a pass through mode.

    UNIFIED STRUCTURED AND SEMI-STRUCTURED DATA TYPES IN DATABASE SYSTEMS

    公开(公告)号:US20240427790A1

    公开(公告)日:2024-12-26

    申请号:US18497746

    申请日:2023-10-30

    Applicant: Snowflake Inc.

    Abstract: The subject technology receives a query, the query referencing a unified representation for structured type data and semi-structured type data, the unified representation being provided in storage and in memory during query processing, the unified representation comprising a set of structured type fields that include a set of semi-structured typed fields that enables type safety and enforcement for the set of structured type fields, and flexibility for the set of semi-structured typed fields in a same column, the unified representation in storage including type information for the semi-structured type data as part of the semi-structured type data, the unified representation being utilized for structured type data and semi-structured type data. The subject technology processes the query using the unified representation stored in the memory, the unified representation providing performance parity between structured type data and semi-structured type data.

    LAZY REASSEMBLING OF SEMI-STRUCTURED DATA

    公开(公告)号:US20220358128A1

    公开(公告)日:2022-11-10

    申请号:US17814110

    申请日:2022-07-21

    Applicant: Snowflake Inc.

    Abstract: A pruning index is generated for a source table organized into a set of batch units. The source table comprises a column of semi-structured data. The pruning index comprises a set of filters that index distinct values in each column of the source table. Rather than reassembling an entire tree structure of the semi-structured data prior to indexing, the generating of the pruning index comprises traversing a reassembly hook object that represents a first portion of the semi-structured data that is subcolumnarized and traversing a residual object that represents a second portion of the semi-structured data that is not subcolumnarized. The reassembly hook object is traversed to identify values corresponding to the first portion of the semi-structured data and the residual object is traversed to identify values corresponding to the second portion. The pruning index is stored with an association with the source table.

    Aggregation operator optimization during query runtime

    公开(公告)号:US11468063B2

    公开(公告)日:2022-10-11

    申请号:US17232821

    申请日:2021-04-16

    Applicant: Snowflake Inc.

    Abstract: The subject technology provides information, corresponding to properties of a build side of a join operation, to a bloom filter. The subject technology, based at least in part on the information from the bloom filter, determines, during executing of a query plan, at least one property of the join operation to determine whether to switch an aggregation operator to a pass through mode, the at least one property comprising at least a reduction rate. The subject technology, switches, in response to the reduction rate being below a threshold value, the aggregation operator to the pass through mode during runtime of the query plan and, while the aggregation operator is in the pass through mode, an input stream of data goes through the aggregation operator without being analyzed and the input stream of data matches an output stream of data flowing out of the aggregation operator.

    FRAMEWORK FOR PROVIDING INTERMEDIATE AGGREGATION OPERATORS IN A QUERY PLAN

    公开(公告)号:US20210263929A1

    公开(公告)日:2021-08-26

    申请号:US16939750

    申请日:2020-07-27

    Applicant: Snowflake Inc.

    Abstract: The subject technology receives a query plan, the query plan comprising a set of query operations, the set of query operations including at least one aggregation. The subject technology analyzes the at least one aggregation to generate a modified query plan, the modified query plan including at least a top aggregation operator, an intermediate aggregation operator, and a bottom aggregation operator. The subject technology performs, with respect to the intermediate aggregation operator, at least one operation comprising: the subject technology receives an input intermediate data type; the subject technology performs an internalize operation on the input intermediate data type to generate an internal state; the subject technology performs an accumulate operation on the internal state to generate intermediate data; and the subject technology performs an externalize operation on the intermediate data to generate an output data type.

    Placement of adaptive aggregation operators and properties in a query plan

    公开(公告)号:US10997173B2

    公开(公告)日:2021-05-04

    申请号:US16857790

    申请日:2020-04-24

    Applicant: Snowflake Inc.

    Abstract: The subject technology receives a query plan, the query plan comprising a set of query operations, the set of query operations including at least one aggregation and at least one join operation. The subject technology analyzes the query plan to identify an aggregation that is redundant. The subject technology removes the aggregation based at least in part on the analyzing. The subject technology determines at least one aggregation property corresponding to at least one query operation of the query plan. The subject technology inserts at least one adaptive aggregation operator in the query plan based at least in part on the at least one aggregation property. The subject technology provides a modified query plan based at least in part on the inserted at least one adaptive aggregation operator in the query plan.

    BUILD-SIDE SKEW HANDLING FOR HASH-PARTITIONING HASH JOINS IN DISTRIBUTED DATABASE QUERY EXECUTION

    公开(公告)号:US20240419663A1

    公开(公告)日:2024-12-19

    申请号:US18819649

    申请日:2024-08-29

    Applicant: Snowflake Inc.

    Abstract: Provided herein are systems, methods, and computer-storage media for managing data skew in hash join operations. A skew manager partitions build-side row data into multiple sets corresponding to hash-join-build (HJB) instances based on hash values. The skew manager detects skew in a build-side row set associated with a first HJB instance by analyzing the number of rows. Upon detecting skew, the skew manager redirects data rows to at least a second HJB instance. The method involves configuring skew caches, generating histograms, and detecting frequent hash values to identify skew. It also includes communicating skew notifications, broadcasting probe-side row data, and adjusting partitioning of probe-side data. The disclosed techniques further include buffering build-side row sets in streams and performing join operations based on these streams, enhancing efficiency in distributed computing environments.

    EFFICIENT DATABASE QUERY EVALUATION
    19.
    发明公开

    公开(公告)号:US20240220456A1

    公开(公告)日:2024-07-04

    申请号:US18607857

    申请日:2024-03-18

    Applicant: Snowflake Inc

    CPC classification number: G06F16/1744 G06F16/221 G06F16/27

    Abstract: Data in a micro-partition of a table is stored in a compressed form. In response to a database query on the table comprising a filter, the portion of the data on which the filter operates is decompressed, without decompressing other portions of the data. Using the filter on the decompressed portion of the data, the portions of the data that are responsive to the filter are determined and decompressed. The responsive data is returned in response to the database query. When a query is run on a table that is compressed using dictionary compression, the uncompressed data may be returned along with the dictionary look-up values. The recipient of the data may use the dictionary look-up values for memoization, reducing the amount of computation required to process the returned data.

Patent Agency Ranking