aio-starrocks-query-tuning

aio-starrocks-query-tuning is a skill for Claude Code from aiocean/claude-plugins. It costs 102 tokens per session (4,864 once invoked), scanned A, original, MIT.

A guide to making StarRocks database queries run more efficiently by examining their execution plans and runtime measurements.

In plain words
What is it for?
It is for diagnosing slow StarRocks queries, reading EXPLAIN and Query Profile output, rewriting SQL, adjusting schemas, and choosing query hints.
Why use it?
It helps locate slow operators, inefficient joins, data-distribution problems, and SQL choices that make queries take longer than necessary.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the aio-starrocks plugin — 2 skills shipped together

Good fit It is for diagnosing slow StarRocks queries, reading EXPLAIN and Query Profile output, rewriting SQL, adjusting schemas, and choosing query hints.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aiocean/claude-plugins/aio-starrocks-query-tuning
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aiocean/claude-plugins --skill aio-starrocks-query-tuning
Clone the repo
git clone --depth 1 https://github.com/aiocean/claude-plugins

Made for: Claude Code.

Or install aio-starrocks, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aio-starrocks-query-tuning

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-starrocks-query-tuning/github.svg)](https://agentmods.dev/skills/aiocean/claude-plugins/aio-starrocks-query-tuning)
Your own site
<a href="https://agentmods.dev/skills/aiocean/claude-plugins/aio-starrocks-query-tuning"><img src="https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-starrocks-query-tuning/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for aio-starrocks-query-tuning

Your own site · 80×15
<a href="https://agentmods.dev/skills/aiocean/claude-plugins/aio-starrocks-query-tuning"><img src="https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-starrocks-query-tuning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,864 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00102 $0.04864
Opus 5 $0.00051 $0.02432
Sonnet 5 $0.00020 $0.00973
Haiku 4.5 $0.00010 $0.00486

Measured 5d ago against content hash bab435054df1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

aio-starrocks-query-tuning scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/aio-starrocks/skills/aio-starrocks-query-tuning/SKILL.md · 606 lines

How it starts

The opening of the file, as written. The whole thing — 606 lines — stays where its author put it; the contents beside it link to each section on GitHub.

StarRocks Query Tuning

Complete reference from docs.starrocks.io/docs/best_practices/query_tuning/.

  • /aio-starrocks-best-practices — Table design: partitioning, bucketing, sort keys, PK tuning
  • /starrocks — Query syntax, cluster connections, Grafana integration (external skill, not part of this plugin)
  • /starrocks-expert — General table types, data loading, materialized views (external skill, not part of this plugin)

1. Tuning Methodology — Top-Down Diagnostic

Five-step process, always in order:

  1. Identify — Use monitoring, query history, audit logs to detect slow queries or resource bottlenecks
  2. Collect & AnalyzeEXPLAIN / EXPLAIN ANALYZE + Query Profile for detailed metrics
  3. Locate Root Cause — Pinpoint problematic operators: join order, missing indexes, data distribution, SQL inefficiencies
  4. Apply Tuning — SQL rewriting, schema optimization, query hints, session variables
  5. Validate & Iterate — Rerun, compare metrics, review plans, continue optimizing

2. Query Plans — EXPLAIN Variants

Commands

Command What It Shows When to Use
EXPLAIN LOGICAL Simplified logical plan Quick overview
EXPLAIN Basic physical plan Standard analysis
EXPLAIN VERBOSE Detailed physical plan with extensive info Deep investigation
EXPLAIN COSTS Physical plan + cost estimates per operation Cost comparison
EXPLAIN ANALYZE Executes query + actual runtime statistics Production diagnosis
-- Quick check
EXPLAIN SELECT shop_id, SUM(net_sales) FROM sales WHERE shop_id = 123 GROUP BY shop_id;

-- Deep investigation
EXPLAIN VERBOSE SELECT ...;

-- Actual execution stats (runs the query!)
EXPLAIN ANALYZE SELECT ...;

Plan Hierarchy

Plans are structured in 3 levels — read bottom-up starting from scan nodes:

  1. Fragment — Top-level work units distributed to BEs. Spawn FragmentInstances.
  2. Pipeline — Chain of operators within a fragment. Concurrent PipelineDrivers.
  3. Operator — Atomic execution steps: scan, join, aggregate, sort, exchange, etc.

Read the full file on GitHub · 606 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 606 lines · 102 tokens per session scan A bab435054df1

Subscribe to this mod's changes

aio-starrocks-query-tuning is a skill published in the GitHub repository aiocean/claude-plugins (4 stars, last pushed 6d ago), licensed MIT. It adds 102 tokens to every session and 4,864 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

optimize

Analyze and suggest performance improvements for code, queries, or systems.

FlorianBruniaux/claude-code-ultimate-guide · 15 tokens

memstack-security-rls-checker

Use this skill when the user says 'check RLS', 'audit RLS', 'RLS policies', 'row level security', 'Supabase security audit', or needs to verify table-level access control. Audits Supabase Row Level Security policies across all tables. Do NOT use for non-Supabase projects or writing RLS policies from scratch.

cwinvestments/memstack · 80 tokens

memstack-security-rls-guardian

Use this skill when creating or altering database tables in Supabase or PostgreSQL projects. Triggers include: CREATE TABLE, ALTER TABLE, migration files, 'RLS', 'row level security', 'new table', 'database schema'. Enforces Row Level Security policies on every table to prevent unauthorized data access. Do NOT use for…

cwinvestments/memstack · 84 tokens

source-command-audit-whitepapers

Audit version freshness, FR/EN parity, and metadata quality of all whitepapers and recap cards.

FlorianBruniaux/claude-code-ultimate-guide · 26 tokens

audit-agents-skills

Audit Claude Code agents, skills, and commands for quality and production readiness. Use when evaluating skill quality, checking production readiness scores, or comparing agents against best-practice templates.

FlorianBruniaux/claude-code-ultimate-guide · 41 tokens

design-patterns

Detect, suggest, and evaluate GoF design patterns in TypeScript/JavaScript codebases. Use when refactoring code, applying singleton/factory/observer/strategy patterns, reviewing pattern quality, or finding stack-native alternatives for React, Angular, NestJS, and Vue.

FlorianBruniaux/claude-code-ultimate-guide · 59 tokens