Don't use Orca to plan FROM-less SELECT queries - #400
Open
Alena0704 wants to merge 1 commit into
Open
Conversation
Alena0704
marked this pull request as draft
July 7, 2026 08:21
Alena0704
force-pushed
the
orca-skip-constant-select
branch
from
July 7, 2026 08:50
25c8169 to
8e4ab9e
Compare
andr-sokolov
reviewed
Jul 7, 2026
andr-sokolov
reviewed
Jul 7, 2026
Alena0704
force-pushed
the
orca-skip-constant-select
branch
6 times, most recently
from
July 9, 2026 11:11
90844bd to
6b7ed8f
Compare
Contributor
Author
|
Just in case, I'll write about changes in out files of regression tests. All changes stem from one cause: trivial constant SELECTs with no range table (SELECT 1, SELECT pg_column_size(...), SELECT pg_lock_status()) now bypass ORCA and are planned by the Postgres planner.
|
Alena0704
marked this pull request as ready for review
July 12, 2026 23:02
Alena0704
force-pushed
the
orca-skip-constant-select
branch
3 times, most recently
from
August 25, 2026 17:08
9466824 to
77b21f8
Compare
Queries without a FROM clause - "SELECT 42", but also function calls like
"SELECT pg_column_size('...')" - have nothing to distribute across segments.
Orca does plan them, but its plan is no better than the Postgres planner's,
so it only adds optimization overhead.
Skip Orca for such queries unless they have sublinks or parameters or
come from a utility statement.
Alena0704
force-pushed
the
orca-skip-constant-select
branch
from
September 1, 2026 07:30
77b21f8 to
d126fcd
Compare
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.
Don't use Orca to plan FROM-less SELECT queries
Queries without a FROM clause - "SELECT 42", but also function calls like "SELECT pg_column_size('...')" — have nothing to distribute across segments. Orca does plan them, but its plan is no better than the Postgres planner's, so it only adds optimization overhead.
Skip Orca for such queries unless they have sublinks or parameters or come from a utility statement.