PHOENIX-7876 Improve EXPLAIN#2556
Open
apurtell wants to merge 27 commits into
Open
Conversation
…zation compatibility (apache#2495) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…pache#2503) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…apache#2507) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…ters (apache#2511) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…pache#2513) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…ILD decorations (apache#2514) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…IN (apache#2522) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…pache#2524) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…pache#2528) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…e#2529) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…tOptimizerDecision (apache#2532) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…e#2537) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…ache#2538) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…xts (apache#2544) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…inner plans (apache#2545) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
…pache#2546) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
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.
Phoenix's
EXPLAIN [WITH REGIONS]output is today incomplete and easy to misread for both query analysis and performance investigation. Non-trivial joins render with almost no detail. The cost vector advertises three dimensions but only compares IO, and estimates/statistics are unreliable. Some optimizations are incorrectly categorized, for example some shown as row-eliminating predicates are actually column-projection optimizations. The operator trees of complex queries are flattened to a single ident level. Many planner facts are not surfaced at all, such as which rule chooses an index, which indexes the optimizer considered but rejected, what query rewrites took place (e.g. subquery decorrelation, star-join detection, right-to-left normalization, HAVING lift, RVC-offset translation, reverse-scan substitution, UNION ORDER BY, index expression substitution, and more), the specific hash-join strategy chosen, salt bucket counts, local vs. global vs. uncovered-global index distinctions, the particular flavor of atomic upsert chosen and server-side atomic update expressions, multi tenant context, CDC scope, transaction provider, projection lists, predicate to filter attribution, hints honored vs ignored, and the structure of the JSON/BSON/array path expressions evaluated server-side.This proposal closes all of those gaps. Details provided in the design document
This work was implemented on the dev branch PHOENIX-7876-feature. All of the individual commits made on the dev branch are preserved as independent commits for this PR.
The bulk of the changes are to unit tests and integration tests where they formerly dumped raw EXPLAIN text and did exact string matching against the result. Now every test uses a fluent assertion API against ExplainPlanAttributes. The coverage of the tests has not changed. Their maintainability has improved 1000% (imho). The EXPLAIN features themselves have significantly more test coverage now. Everything I touched I added tests for. Most of them are connectionless tests that don't require a minicluster.
PHOENIX_EXPLAIN_MIGRATION_GUIDE.md is a migration guide for anyone scraping today's EXPLAIN PLAN output.
PHOENIX_EXPLAIN_EXAMPLES.md is a companion document for the reviewer's guide that illustrates the new capabilities with ~60 examples that exercise the new and modified EXPLAIN PLAIN features.
The following tests are known to have pre-existing failure or flake conditions and flake or fail on current
master:I have root caused these failures and have either already filed a JIRA for them or will will shortly.
Co-Authored-By: Claude Opus 4.8[1m] noreply@anthropic.com