Query processing using hybrid table secondary indexes

    公开(公告)号:US12061587B2

    公开(公告)日:2024-08-13

    申请号:US18171296

    申请日:2023-02-17

    申请人: Snowflake Inc.

    IPC分类号: G06F16/22 G06F16/28

    摘要: The subject technology obtains a read timestamp of a first transaction. The subject technology performs a first read operation on a parent table associated with the first transaction to determine a set of committed versions of the parent table. The subject technology determines whether a key exists in the parent table based on the first transaction. The subject technology, in response to the key existing in the parent table, performs a first write operation on a child table. The subject technology determines whether a duplicate key exists in the child table. The subject technology, in response to determining that there is no duplicate key in the child table, determines whether there is a conflict with the key. The subject technology, in response to determining that there is no conflict with the key, performs a second write operation on a secondary index table of the child table.

    HYBRID TABLE SECONDARY INDEX FOR LOOKUPS, UNIQUE CHECKS, AND REFERENTIAL INTEGRITY CONSTRAINTS

    公开(公告)号:US20240104116A1

    公开(公告)日:2024-03-28

    申请号:US18524784

    申请日:2023-11-30

    申请人: Snowflake Inc.

    IPC分类号: G06F16/28 G06F16/22

    摘要: The subject technology generates a nested object based on a set of metadata, the set of metadata including information linking the nested object to a table object associated with a base table. The subject technology generates a second table object associated with the nested object, the second table object representing a secondary index of the base table, the second table object including information linking the second table object to the nested object. The subject technology generates a second nested object based on a particular set of metadata, the particular set of metadata including information linking the second nested object to the table object. The subject technology generates a third table object associated with the second nested object, the third table object representing a particular secondary index of the base table, the third table object including information linking the third table object to the second nested object.

    HYBRID TABLE SECONDARY INDEX FOR LOOKUPS, UNIQUE CHECKS, AND REFERENTIAL INTEGRITY CONSTRAINTS

    公开(公告)号:US20230401236A1

    公开(公告)日:2023-12-14

    申请号:US18171292

    申请日:2023-02-17

    申请人: Snowflake Inc.

    IPC分类号: G06F16/28 G06F16/22

    摘要: The subject technology receives, from a metadata database, information related to a base table. The subject technology determines a table object associated with the base table, the table object including a first set of metadata. The subject technology generates a nested object based on a second set of metadata, the second set of metadata including information linking the nested object to the table object. The subject technology generates a second table object associated with the nested object, the second table object representing a secondary index of the base table, the second table object including information linking the second table object to the nested object. The subject technology establishes a link between the second table object to the base table based on the nested object. The subject technology stores, in the metadata database, the nested object and the second table object.

    A DISTRIBUTED DATABASE THAT USES HYBRID TABLE SECONDARY INDEXES

    公开(公告)号:US20230205785A1

    公开(公告)日:2023-06-29

    申请号:US18171297

    申请日:2023-02-17

    申请人: Snowflake Inc.

    IPC分类号: G06F16/27 G06F9/46

    CPC分类号: G06F16/273 G06F9/466

    摘要: The subject technology receives, by a distributed database, transactional queries against a key-value database comprising data managed by key-value pairs. The subject technology performs, using asynchronous threads of execution nodes of the distributed database, asynchronous transformation and compaction of key-value pairs of data that corresponds to the plurality of transactional queries. The subject technology performs, using asynchronous threads of execution nodes of the distributed database, asynchronous transformation and compaction of a set of secondary indexes that corresponds to the plurality of transactional queries. The subject technology processes, using transactional threads in the execution nodes, the plurality of transactional queries to generate results data, the asynchronous threads performing the asynchronous transformation and compaction while the transactional threads generate the results data.

    Deferred constraints support in distributed database systems

    公开(公告)号:US12007990B1

    公开(公告)日:2024-06-11

    申请号:US18447934

    申请日:2023-08-10

    申请人: Snowflake Inc.

    摘要: The subject technology receives a query, the query including a set of statements, the set of statements including a first statement comprising a first data manipulation language operation. The subject technology determines that the set of statements includes at least one statement defining a first constraint, and a second statement indicating that the first constraint is statement deferrable for performing validation of the first constraint. The subject technology generates a key value constraint check operator as a node in a query plan. The subject technology generates a key value DML operator as a second node in the query plan, the key value DML operator corresponding to the first DML operation. The subject technology performs, using the key value constraint check operator, a validation process of the first constraint based at least in part on a set of violating keys of each DML operation from the set of statements.

    Hybrid table secondary index for lookups, unique checks, and referential integrity constraints

    公开(公告)号:US11880388B2

    公开(公告)日:2024-01-23

    申请号:US18171292

    申请日:2023-02-17

    申请人: Snowflake Inc.

    IPC分类号: G06F17/30 G06F16/28 G06F16/22

    摘要: The subject technology receives, from a metadata database, information related to a base table. The subject technology determines a table object associated with the base table, the table object including a first set of metadata. The subject technology generates a nested object based on a second set of metadata, the second set of metadata including information linking the nested object to the table object. The subject technology generates a second table object associated with the nested object, the second table object representing a secondary index of the base table, the second table object including information linking the second table object to the nested object. The subject technology establishes a link between the second table object to the base table based on the nested object. The subject technology stores, in the metadata database, the nested object and the second table object.

    QUERY PROCESSING USING HYBRID TABLE SECONDARY INDEXES

    公开(公告)号:US20230401189A1

    公开(公告)日:2023-12-14

    申请号:US18171296

    申请日:2023-02-17

    申请人: Snowflake Inc.

    IPC分类号: G06F16/22 G06F16/28

    CPC分类号: G06F16/2272 G06F16/283

    摘要: The subject technology obtains a read timestamp of a first transaction. The subject technology performs a first read operation on a parent table associated with the first transaction to determine a set of committed versions of the parent table. The subject technology determines whether a key exists in the parent table based on the first transaction. The subject technology, in response to the key existing in the parent table, performs a first write operation on a child table. The subject technology determines whether a duplicate key exists in the child table. The subject technology, in response to determining that there is no duplicate key in the child table, determines whether there is a conflict with the key. The subject technology, in response to determining that there is no conflict with the key, performs a second write operation on a secondary index table of the child table.