-
公开(公告)号:US20240419666A1
公开(公告)日:2024-12-19
申请号:US18336426
申请日:2023-06-16
Applicant: Snowflake Inc,
Inventor: Sangyong Hwang , Sourav Sikdar , Li Yan
IPC: G06F16/2453
Abstract: The subject technology receives a first query plan corresponding to a query, the first query plan comprising a set of join nodes, and a join order hint of a target query plan, each join node of the target query plan associated with a hint. The subject technology generates a second query plan to correct a set of vertical positions of a set of terminal nodes of the first query plan following the join order hint of the target query plan. The subject technology generates a third query plan to correct a set of lateral positions of the set of terminal nodes of the second query plan following the join order hint of the target query plan. The subject technology, for each join node from the set of join nodes of the third query plan, indicates that each join node has been hinted. The subject technology generates, after each join node of the third query plan has been indicated as being hinted, the target query plan based at least in part on the third query plan.
-
公开(公告)号:US11687531B2
公开(公告)日:2023-06-27
申请号:US18051185
申请日:2022-10-31
Applicant: Snowflake Inc.
Inventor: Sangyong Hwang , Sourav Sikdar , Li Yan
IPC: G06F16/245 , G06F16/2453 , G06F16/2455 , G06F11/34
CPC classification number: G06F16/24542 , G06F11/3419 , G06F16/24549 , G06F16/24565 , G06F2201/80 , G06F2201/81
Abstract: The subject technology tracks a plurality of queries corresponding to a plurality of query plans based on join operations contained in each of the plurality of queries and a previous time of executing each query. The subject technology selects a first query plan among the plurality of query plans. The subject technology determines a value indicating an estimated improvement in execution time of the first query plan in comparison to a previous execution time of a previous query plan. The subject technology attempts to execute a first query using the first query plan. The subject technology determines that a second query plan selected among the plurality of query plans has a second estimated execution time that is less than an estimated execution time of the first query plan. The subject technology executes the first query corresponding to the first query plan at a subsequent time using the second query plan.
-
公开(公告)号:US11544263B2
公开(公告)日:2023-01-03
申请号:US17657468
申请日:2022-03-31
Applicant: Snowflake Inc.
Inventor: Sangyong Hwang , Sourav Sikdar , Li Yan
IPC: G06F16/245 , G06F16/2453 , G06F11/34 , G06F16/2455
Abstract: The subject technology receives a first query plan corresponding to a first query, the first query plan comprising a new query plan different than a previous query plan for the first query. The subject technology determines a value indicating an estimated improvement in execution time of the first query plan in comparison to a previous execution time of the previous query plan. The subject technology, in response to determining that the value is greater than a threshold value, attempting to execute the first query using the first query plan, the attempting comprising determining that a second query plan selected among a plurality of query plans has a second estimated execution time that is less than an estimated execution time of the first query plan, and executing the first query at a subsequent time using the second query plan.
-
公开(公告)号:US12045236B2
公开(公告)日:2024-07-23
申请号:US17932140
申请日:2022-09-14
Applicant: Snowflake Inc.
Inventor: Thierry Cruanes , Sangyong Hwang , Nitish Jindal , Jiaqi Yan , Yongsik Yoon
IPC: G06F16/2453
CPC classification number: G06F16/24544 , G06F16/24537
Abstract: Techniques for join elimination are described herein. Join elimination can identify and eliminate unnecessary joins in a query plan node. For example, join elimination can involve a semantic query optimization technique, which removes reference to a table whose columns are only referenced in join predicates if the joins do not filter/expand rows in the result. Such joins can cause significant performance issues on larger datasets if not optimized.
-
公开(公告)号:US20240143588A1
公开(公告)日:2024-05-02
申请号:US18400760
申请日:2023-12-29
Applicant: Snowflake Inc.
Inventor: Zixuan Geng , Sangyong Hwang , Nitish Jindal
IPC: G06F16/2453
CPC classification number: G06F16/24542 , G06F16/24537
Abstract: The subject technology receives a first query plan, the first query plan including a set of statements, the set of statements including at least one statement with at least a reference to a particular column in a first table. The subject technology identifies a first predicate from the at least one statement, the first predicate corresponding to a join operation. The subject technology determines, for the particular column, a set of expression properties. The subject technology, based on the set of expression properties, determines a first derived predicate, the first derived predicate corresponding to a first filter operation. The subject technology generates a new operation based on the first derived predicate. The subject technology generates a new query plan based at least in part on the join operation of first predicate, the first derived predicate, and the new operation of the first derived predicate.
-
公开(公告)号:US20230135440A1
公开(公告)日:2023-05-04
申请号:US17932140
申请日:2022-09-14
Applicant: Snowflake inc.
Inventor: Thierry Cruanes , Sangyong Hwang , Nitish Jindal , Jiaqi Yan , Yongsik Yoon
IPC: G06F16/2453
Abstract: Techniques for join elimination are described herein. Join elimination can identify and eliminate unnecessary joins in a query plan node. For example, join elimination can involve a semantic query optimization technique, which removes reference to a table whose columns are only referenced in join predicates if the joins do not filter/expand rows in the result. Such joins can cause significant performance issues on larger datasets if not optimized.
-
公开(公告)号:US20220245148A1
公开(公告)日:2022-08-04
申请号:US17657468
申请日:2022-03-31
Applicant: Snowflake Inc.
Inventor: Sangyong Hwang , Sourav Sikdar , Li Yan
IPC: G06F16/2453 , G06F11/34 , G06F16/2455
Abstract: The subject technology receives a first query plan corresponding to a first query, the first query plan comprising a new query plan different than a previous query plan for the first query. The subject technology determines a value indicating an estimated improvement in execution time of the first query plan in comparison to a previous execution time of the previous query plan. The subject technology, in response to determining that the value is greater than a threshold value, attempting to execute the first query using the first query plan, the attempting comprising determining that a second query plan selected among a plurality of query plans has a second estimated execution time that is less than an estimated execution time of the first query plan, and executing the first query at a subsequent time using the second query plan.
-
公开(公告)号:US11314740B1
公开(公告)日:2022-04-26
申请号:US17236471
申请日:2021-04-21
Applicant: Snowflake Inc.
Inventor: Sangyong Hwang , Sourav Sikdar , Li Yan
IPC: G06F16/245 , G06F16/2453 , G06F16/2455 , G06F11/34
Abstract: The subject technology receives a first query plan corresponding to a first query, the first query plan comprising a new query plan different than a previous query plan for the first query. The subject technology determines a value indicating an estimated improvement in execution time of the first query plan in comparison to a previous execution time of the previous query plan. The subject technology determines that the value is greater than a threshold value. The subject technology, in response to the value being greater than the threshold value, executes the first query using the first query plan.
-
公开(公告)号:US11893016B1
公开(公告)日:2024-02-06
申请号:US18049904
申请日:2022-10-26
Applicant: Snowflake Inc.
Inventor: Zixuan Geng , Sangyong Hwang , Nitish Jindal
IPC: G06F16/24 , G06F16/2453
CPC classification number: G06F16/24542 , G06F16/24537
Abstract: The subject technology provides embodiments for enabling derivation of predicates not only from other predicates but also from metadata such as expression properties. In examples, predicates are derived, avoiding unwanted impact on cardinality estimation. In other examples, predicates are derived, avoiding artificial runtime errors and providing a way to avoid security issues with secure views.
-
公开(公告)号:US20250045277A1
公开(公告)日:2025-02-06
申请号:US18656062
申请日:2024-05-06
Applicant: Snowflake Inc.
Inventor: Sangyong Hwang , Adem Khachnaoui , Li Yan , Yongsik Yoon
IPC: G06F16/2453 , G06F11/34 , G06F16/22
Abstract: A query engine can use partition-granular level statistics to optimize query performance. A query can reference a table with a plurality of partitions and include a predicate. A partition-granular selectivity estimate for the predicate can be generated based on statistics stored regarding the plurality of partitions of the table. A query plan can be generated based on partition-granular selectivity estimate to optimize query processing.
-
-
-
-
-
-
-
-
-