forked from babelfish-for-postgresql/babelfish_extensions
-
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.
Performance improvements when query includes sys.indexes.is_primary_k…
…ey predicate (babelfish-for-postgresql#2917) Previously for a query we were observing a performance degradation when it included a join between sys.indexes, sys.index_columns, sys.columns, sys.tables, and sys.schemas views with sys.indexes.is_primary_key = 1 predicate in where clause. We identified that there was the issue with a case statement due to which there was an incorrect row estimation so we have implemented a direct cast by defining new IMPLICIT cast without function from boolean to sys.bit. Another issue was the use of redundant has_schema_privilege in sys views and functions, as we explicitly grant usage to public beforehand, so we have removed the redundant has_schema_privilege check. Issues Resolved: BABEL-5215 Signed-off-by: Tanya Gupta <[email protected]>
- Loading branch information
1 parent
0a7bedb
commit 2bb7f70
Showing
14 changed files
with
2,562 additions
and
111 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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.