starrocks-explain-plan

Interpret StarRocks EXPLAIN outputs to diagnose slow query bottlenecks.

14|1|Updated May 5, 2026
One-click install
npx skills add https://github.com/ivanshamaev/de-agent-skills --skill starrocks-explain-plan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: starrocks-explain-plan
Source: https://github.com/ivanshamaev/de-agent-skills/tree/main/group_skills/starrocks_group_skills/starrocks_explain_plan
Command: npx skills add https://github.com/ivanshamaev/de-agent-skills --skill starrocks-explain-plan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you pinpoint why a StarRocks query is slow by turning EXPLAIN output into an actionable checklist for shuffle cost, scan selectivity, runtime filters, and optimizer decisions.

Core Features & Use Cases

  • EXPLAIN mode selection for the right layer: guides you through logical (EXPLAIN), physical (EXPLAIN VERBOSE), costed (EXPLAIN COSTS), and runtime-with-metrics (EXPLAIN ANALYZE) views.
  • Plan structure decoding: explains fragments, pipelines, and ExchangeNode communication types to identify where distributed cost is introduced.
  • Root-cause signals for performance tuning: interprets partition pruning, MV/rollup rewrites, PREAGGREGATION behavior, runtime filter propagation, join strategies (BROADCAST/SHUFFLE/COLOCATE), and cardinality/statistics issues.
  • Operator-level bottleneck analysis: shows how to use metrics like OperatorTotalTime, PeakMemoryBytes, and row movement (Pull/Push) to locate the slowest operator.

Quick Start

Run EXPLAIN ANALYZE for your slow StarRocks query, then check partition pruning in every OlapScanNode, confirm runtime filter IDs match between HashJoinNode and scan nodes, and verify whether the scan is reading from an MV rollup via the rollup/table fields.

Frequently Asked Questions about starrocks-explain-plan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose a slow StarRocks query using EXPLAIN?

To diagnose a slow StarRocks query, run EXPLAIN ANALYZE to get runtime metrics, then systematically check OlapScanNode for partition pruning, verify runtime filter IDs between HashJoinNode and scan nodes, and review join strategy and shuffle costs to pinpoint bottlenecks.

What is the difference between EXPLAIN VERBOSE and EXPLAIN COSTS in StarRocks?

EXPLAIN VERBOSE shows the physical execution plan structure including fragments and pipelines, while EXPLAIN COSTS provides the costed view with cardinality estimation and statistics. Both help interpret distributed ExchangeNode communication and optimizer decisions for performance tuning.

Why does my StarRocks query show high shuffle cost in the execution plan?

High shuffle cost in StarRocks execution plans often stems from suboptimal join strategy selection or missing COLOCATE joins. Decode fragment and ExchangeNode communication types to identify where distributed data movement is introduced, and verify cardinality estimation correctness.

How do I verify if a materialized view rewrite is being used in StarRocks?

To verify materialized view rewrite in StarRocks, check the rollup and table fields in your EXPLAIN output. The plan should indicate whether the scan reads from an MV rollup instead of the base table, confirming the optimizer successfully applied the rewrite.

Can I check runtime filter pushdown effectiveness in StarRocks EXPLAIN?

Yes, you can check runtime filter pushdown in StarRocks EXPLAIN by confirming runtime filter IDs match between HashJoinNode and scan nodes. This verifies that filters are properly propagated to scan operators for early data pruning.

What metrics should I look at to find the slowest operator in StarRocks?

To find the slowest operator in StarRocks, use EXPLAIN ANALYZE metrics including OperatorTotalTime, PeakMemoryBytes, and row movement patterns (Pull/Push). These operator-level runtime metrics directly locate performance bottlenecks within the pipeline.