PAX: treat PAX tables as AO-like in index path generation#1761
Open
yjhjstz wants to merge 1 commit into
Open
Conversation
Random TID fetches on PAX tables re-decompress entire stripes (1.5 MB ZSTD blocks) per tuple and bypass the buffer pool, just like AO/AOCS. get_index_paths() already routes AO/AOCS relations to Bitmap paths only and skips IndexScan/IndexOnlyScan (the latter is unimplemented for AO). Extend the same treatment to PAX so that a btree index over a PAX table no longer triggers full-table Index Only Scan when enable_seqscan=off, which previously caused customer queries to hang indefinitely. Detection uses the existing PAX_AM_OID; RelOptInfo gains a relam field cached from rd_rel->relam (mirroring amhandler) so the planner can do the comparison without opening the relation. Heap tables and existing AO behavior are unaffected.
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.
Random TID fetches on PAX tables re-decompress entire stripes (1.5 MB ZSTD blocks) per tuple and bypass the buffer pool, just like AO/AOCS. get_index_paths() already routes AO/AOCS relations to Bitmap paths only and skips IndexScan/IndexOnlyScan (the latter is unimplemented for AO). Extend the same treatment to PAX so that a btree index over a PAX table no longer triggers full-table Index Only Scan when enable_seqscan=off, which previously caused customer queries to hang indefinitely.
Detection uses the existing PAX_AM_OID; RelOptInfo gains a relam field cached from rd_rel->relam (mirroring amhandler) so the planner can do the comparison without opening the relation.
Heap tables and existing AO behavior are unaffected.
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions