Optimizations for long-lived statements in a database system

    公开(公告)号:US11704305B1

    公开(公告)日:2023-07-18

    申请号:US17649737

    申请日:2022-02-02

    Applicant: Snowflake Inc.

    CPC classification number: G06F16/2379 G06F9/524 G06F16/2365

    Abstract: The subject technology performs a search for a key in a regular space to locate a first visible version of the key. The subject technology determines that the first visible version of the key is not one of a N number of newest versions of the key. The subject technology performs a search of an undo space to locate a second visible version of the key. The subject technology determines whether the first visible version or the second visible version of the key is newer. The subject technology provides a newer version of the key between the first visible version and the second visible version of the key.

    DEADLOCK DETECTION IN DISTRIBUTED DATABASES

    公开(公告)号:US20220350677A1

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

    申请号:US17647752

    申请日:2022-01-12

    Applicant: Snowflake Inc.

    Abstract: The subject technology performs a locking operation on a first set of keys by a first statement of a first transaction. The subject technology determines that a conflict occurred between the first statement and a second transaction. The subject technology determines that the second transaction has yet to complete after a predetermined period of time. The subject technology performs a deadlock detection process where the subject technology stores a key and value in a table indicating the first transaction and the second transaction, detects, based at least in part on a graph traversal of the table starting from the first transaction, a cycle between the first transaction and the second transaction, and determines that the first transaction is a youngest transaction in the detected cycle. The subject technology ceases execution of the first transaction in response to the first transaction being a youngest transaction in a detected cycle.

    Concurrent transaction processing in a database system

    公开(公告)号:US11468032B2

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

    申请号:US17163034

    申请日:2021-01-29

    Applicant: Snowflake Inc.

    Abstract: The subject technology receives a first transaction. The subject technology assigns a first read version to the first transaction, the first read version indicating a first version of the linearizable storage. The subject technology performs a read operation from the first transaction on a table in a database. The subject technology determines a first commit version identifier corresponding to first data resulting from the read operation. The subject technology, in response to determining that a particular write operation is absent from the first transaction, proceeding to execute a different transaction and foregoing to perform a commit process in connection with the first transaction.

    Concurrent transaction processing in a database system

    公开(公告)号:US11436212B2

    公开(公告)日:2022-09-06

    申请号:US17454368

    申请日:2021-11-10

    Applicant: Snowflake Inc.

    Abstract: The subject technology inserts, by a first transaction, a new version of an object, the inserting corresponding to a first statement from the first transaction, the first statement including information indicating a first key, a first transaction identifier, a first statement number, and a first restart count. The subject technology performs, by a second transaction, a range read, the range read including information indicating the first key. The subject technology receives, after performing the range read, a set of conflicting transactions. The subject technology determines that a conflict occurred between the first transaction and a third transaction from the set of conflicting transactions.

    INCREMENTAL RECLUSTERING BASED ON LOCAL MAXIMA OF PARTITION OVERLAP

    公开(公告)号:US20210248126A1

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

    申请号:US17243795

    申请日:2021-04-29

    Applicant: Snowflake Inc.

    Abstract: Disclosed herein are systems and methods for incremental reclustering of database tables based on local maxima of partition overlap. In an embodiment, a database platform makes a determination, based on one or more incremental-reclustering criteria, to incrementally recluster a database table, which has a clustering key and which is stored across a plurality of partitions. In response to making the determination, the database platform selects a subset of the partitions, and at least incrementally reclusters the selected subset. The selecting of the subset includes identifying a local maximum of a quantity of overlapping partitions in the plurality of partitions with respect to a domain of the clustering key of the table, where the overlapping partitions overlap with respect to the clustering key.

    Caching metadata for a database table

    公开(公告)号:US11080270B2

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

    申请号:US17086253

    申请日:2020-10-30

    Applicant: Snowflake Inc.

    Abstract: The subject technology caches, in connection with processing a first query, one or more table-metadata files in at least one of a current version set of one or more table-metadata files and a new version set of one or more table-metadata files, the new version set of one or more table-metadata files comprising table metadata for a new version of a database table. The subject technology receives a subsequent query directed to the database table. The subject technology downloads, in connection with processing the subsequent query, at least one uncached table-metadata file in a scan set of table-metadata files for the subsequent query. The subject technology processes the subsequent query using the at least one uncached table-metadata file.

    RECLUSTERING OF DATABASE TABLES BASED ON PEAKS AND WIDTHS

    公开(公告)号:US20210200737A1

    公开(公告)日:2021-07-01

    申请号:US17249796

    申请日:2021-03-12

    Applicant: Snowflake Inc.

    Abstract: The subject technology determines whether a table is sufficiently clustered. The subject technology in response to determining the table is not sufficiently clustered, selects one or more micro-partitions of the table to be reclustered. The subject technology constructs a data structure for the table. The subject technology extracts minimum and maximum endpoints for each micro-partition in the data structure. The subject technology sorts each of one or more peaks in the data structure based on height. The subject technology sorts overlapping micro-partitions based on width. The subject technology selects based on which micro-partitions are within the tallest peaks of the one or more peaks and further based on which of the overlapping micro-partitions have the widest widths.

    Database metadata in immutable storage

    公开(公告)号:US10860573B2

    公开(公告)日:2020-12-08

    申请号:US16838301

    申请日:2020-04-02

    Applicant: Snowflake Inc.

    Abstract: A method for a database system includes storing table data for a database, the table data including information in rows and columns of one or more database tables. The method includes storing metadata on immutable storage, the metadata including information about the table data for the database. In one embodiment, mutable metadata may be periodically consolidated in the background to create new versions of metadata files and which allows for deletions of old metadata files and old data files.

Patent Agency Ranking