-
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.
88638: eval: reduce interface->interface conversions in ComparisonWithSubOperator r=mgartner a=mgartner #### colexecproj: add benchmark for colexecproj.defaultCmpRConstProjOp Release note: None #### eval: reduce interface->interface conversions in ComparisonWithSubOperator Consider the schema and queries below. CREATE TABLE a (a STRING); INSERT INTO a SELECT 'abc' || i::STRING FROM generate_series(1, 500) g(i); CREATE TABLE b (b STRING); INSERT INTO b SELECT 'abc' || i::STRING FROM generate_series(1, 75000) g(i); CREATE TABLE c (c STRING); SELECT * FROM b WHERE b IN (SELECT a FROM a) OR b IN (SELECT c FROM c); A significant portion of time is spent performing `tree.Expr` to `tree.Datum` conversions when evaluating the `IN` expressions. This commit eliminates those unnecessary conversions, drastically speeding up execution of the query. Release note (performance improvement): Some types of queries with comparisons with constant values now execute faster. Co-authored-by: Marcus Gartner <marcus@cockroachlabs.com>
- Loading branch information
Showing
4 changed files
with
88 additions
and
14 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