You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2026/06/11 17:47:00 UTC
[jira] [Updated] (PHOENIX-7899) Emit plan level estimates only once in EXPLAIN
[ https://issues.apache.org/jira/browse/PHOENIX-7899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Kyle Purtell updated PHOENIX-7899:
-----------------------------------------
Description: The three effectively plan level estimate columns become part of the top-of-plan disclosure. Today {{PhoenixStatement.ExecutableExplainStatement.compilePlan}} rebuilds the same {{EST_BYTES_READ}} , {{EST_ROWS_READ}} , nad {{EST_INFO_TS}} cells on every {{planSteps}} row, so a reader scanning the result set sees them repeated on every operator and reasonably assumes they are per-step. The three {{PhoenixKeyValueUtil.newKeyValue(...)}} calls for {{EXPLAIN_PLAN_BYTES_ESTIMATE}}, {{EXPLAIN_PLAN_ROWS_ESTIMATE}}, and {{EXPLAIN_PLAN_ESTIMATE_INFO_TS}} are hoisted. Subsequent rows carry just the {{EXPLAIN_PLAN_COLUMN}} cell and the missing estimate cells surface as SQL {{NULL}}. The {{RowProjector}} is unchanged, and the whole block is skipped when {{getEstimated*ToScan()}} returns null. The three plan-total fields are added to {{ExplainPlanAttributes}}.
> Emit plan level estimates only once in EXPLAIN
> ----------------------------------------------
>
> Key: PHOENIX-7899
> URL: https://issues.apache.org/jira/browse/PHOENIX-7899
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Andrew Kyle Purtell
> Assignee: Andrew Kyle Purtell
> Priority: Major
> Fix For: PHOENIX-7876-feature
>
>
> The three effectively plan level estimate columns become part of the top-of-plan disclosure. Today {{PhoenixStatement.ExecutableExplainStatement.compilePlan}} rebuilds the same {{EST_BYTES_READ}} , {{EST_ROWS_READ}} , nad {{EST_INFO_TS}} cells on every {{planSteps}} row, so a reader scanning the result set sees them repeated on every operator and reasonably assumes they are per-step. The three {{PhoenixKeyValueUtil.newKeyValue(...)}} calls for {{EXPLAIN_PLAN_BYTES_ESTIMATE}}, {{EXPLAIN_PLAN_ROWS_ESTIMATE}}, and {{EXPLAIN_PLAN_ESTIMATE_INFO_TS}} are hoisted. Subsequent rows carry just the {{EXPLAIN_PLAN_COLUMN}} cell and the missing estimate cells surface as SQL {{NULL}}. The {{RowProjector}} is unchanged, and the whole block is skipped when {{getEstimated*ToScan()}} returns null. The three plan-total fields are added to {{ExplainPlanAttributes}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)