-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
112700: upgrades: assert descriptor repair has correct set of targets r=rafiss a=annrpom This patch adds a test to assert that during automated repair of corrupt descriptors, we do not try to repair a descriptor that is not corrupted. While testing, it was discovered that function descriptors (regardless of corruption/repair) had their descriptor version increased due to `grantExecuteToPublicOnAllFunctions` being called on each function during a cluster upgrade; however, we noticed that the functions we were testing already had execute privileges for `public`. Thus, a check was added in said logic that ensures functions in this situation (where public already has execute priv. for the func) do not try to grant execute again. Epic: none Fixes: #110906 Release note: None 113319: opt: optimize FuncDepSet.ReduceCols r=mgartner a=mgartner #### opt/bench: add slow-query-5 This commit adds the new `slow-query-5` benchmark which tests a 40+ -way join modelled off of a real-world production query. The query stresses the efficiency of the optimizer, particularly in building and manipulating thousands of functional dependencies for the thousands of possible join orderings. Release note: None #### opt: optimize FuncDepSet.ReduceCols `FuncDepSet.ReduceCols` is used frequently to manipulate `FuncDepSet`s. In queries with many tables, columns, and joins, it can contribute significantly to the latency of query planning, due to the `O(n²)` time complexity of calculating a transitive closure (see `FuncDepSet.inClosureOf`), where `n` is the number of dependencies in the set, and the relatively expensive `SubsetOf` set operation performed multiple times for each of the `n²` iterations. This commit optimizes the `ReduceCols` by adding a fast path that can more quickly determine if a column cannot be reduced by checking if it exists in none of the `to` sets of the functional dependencies. This avoids having to calculate the transitive closure in many cases, significantly speeding up query planning time. Epic: None Release note (performance improvement): Query planning time has been reduced significantly for some queries in which many tables are joined. Co-authored-by: Annie Pompa <[email protected]> Co-authored-by: Marcus Gartner <[email protected]>
- Loading branch information
Showing
6 changed files
with
162 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters