forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
61211: sql,tree: make ::REGPROC cast efficient r=jordanlewis a=jordanlewis Previously, the ::REGPROC cast (which converts an OID of a builtin function to its name or vice versa) was implemented extremely inefficiently: via a query from the internal executor that ultimately has to re-materialize every builtin into memory and filter. This can lead to pathologic quadratic behavior for some common ORM queries. Now, both the oid-to-name and name-to-oid directions are made into constant-time lookups by simply preparing a map of the oid to name and vice versa at startup time. Closes cockroachdb#61082. Release note (performance improvement): introspection queries that use casts into the REGPROC pseudo-type are made much more efficient: they're now implemented as a constant-time lookup instead of an internal query. Release justification: low risk, high benefit changes to existing functionality Co-authored-by: Jordan Lewis <[email protected]>
- Loading branch information
Showing
8 changed files
with
136 additions
and
37 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
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