[
https://issues.apache.org/jira/browse/PHOENIX-7876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18088993#comment-18088993
]
Andrew Kyle Purtell edited comment on PHOENIX-7876 at 6/15/26 6:15 AM:
-----------------------------------------------------------------------
The EXPLAIN improvement feature branch is ready for review.
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_REVIEWER_GUIDE.md] is a reviewer's guide to the changes on
the branch.
[^PHOENIX_EXPLAIN_EXAMPLES.md] is a companion document for the reviewer's
guide that illustrates the new capabilities with ~60 examples that exercise all
of the design features.
was (Author: apurtell):
The feature branch is ready for review.
[^PHOENIX_EXPLAIN_REVIEWER_GUIDE.md] is a reviewer's guide to the changes on
the branch.
[^PHOENIX_EXPLAIN_EXAMPLES.md] is a companion document for the reviewer's
guide that illustrates the new capabilities with ~60 examples that exercise all
of the design features.
> Improve EXPLAIN
> ---------------
>
> Key: PHOENIX-7876
> URL: https://issues.apache.org/jira/browse/PHOENIX-7876
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Andrew Kyle Purtell
> Assignee: Andrew Kyle Purtell
> Priority: Major
> Fix For: PHOENIX-7876-feature
>
> Attachments: PHOENIX_EXPLAIN_EXAMPLES.md,
> PHOENIX_EXPLAIN_REVIEWER_GUIDE.md
>
>
> Phoenix's {{EXPLAIN [WITH REGIONS]}} output is today incomplete and easy to
> misread for both query analysis and performance investigation.
> DDL EXPLAINs don't show columns/PK/families/salt/splits. 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.
> Design document:
> https://docs.google.com/document/d/10H_MNWGQL7ZzsPmIVBMz7T1jJroez8AYpvwouKcBVQo/edit?tab=t.0
--
This message was sent by Atlassian Jira
(v8.20.10#820010)