-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
35742: sql: improve inverted index validation performance r=lucy-zhang a=lucy-zhang To compute the expected number of keys in an inverted index, we currently generate every key and count the number of unique keys, since array elements can produce duplicate keys. This PR avoids some of these allocations by doing a simple count for every non-array JSON type. For a 25GB table of random JSON values generated by the workload, I got a ~15% speedup on the `select sum(crdb_internal.json_num_index_entries(v)) from json.j` query. Release note: None Co-authored-by: Lucy Zhang <[email protected]>
- Loading branch information
Showing
3 changed files
with
76 additions
and
13 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