Outer join removal in citus_tables view#8546
Open
michailtoksovo wants to merge 1 commit intocitusdata:mainfrom
Open
Outer join removal in citus_tables view#8546michailtoksovo wants to merge 1 commit intocitusdata:mainfrom
michailtoksovo wants to merge 1 commit intocitusdata:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #8546 +/- ##
===========================================
- Coverage 88.88% 72.74% -16.15%
===========================================
Files 286 286
Lines 63763 63750 -13
Branches 8017 8012 -5
===========================================
- Hits 56678 46376 -10302
- Misses 4776 14621 +9845
- Partials 2309 2753 +444 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey! I noticed a small issue with the
citus_tablesview: even when selecting just a single column from it (e.g.table_name), it still triggers network communication between nodes due tocitus_shard_size()call within a subquery. I wanted to get rid of that overhead wherever possible.I replaced the INNER JOIN with a LEFT OUTER JOIN. This lets PostgreSQL's outer join removal optimization kick in, so the join (and the extra network traffic) gets completely skipped when the right-side columns aren't used.