starrocks-bucketing

Design StarRocks table bucketing with HASH or RANDOM distribution and bucket counts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you choose StarRocks table bucketing (distribution) so data is evenly spread across backends, joins can use colocate when appropriate, and performance does not degrade due to skew or poorly sized tablets.

Core Features & Use Cases

  • Design bucketing strategy: pick DISTRIBUTED BY HASH vs DISTRIBUTED BY RANDOM, select distribution keys, and choose an appropriate bucket count.
  • Tune for tablet sizing: target 1–10 GB per tablet (recommended ~5 GB) to balance parallelism and metadata/compaction overhead.
  • Diagnose and fix skew: measure tablet distribution and skew ratios, identify skew drivers, and adjust distribution keys or switch strategy.
  • Enable colocate joins: configure colocate_with consistently so frequently joined tables avoid shuffle and use local (colocate) joins.
  • Evolve bucket counts safely: apply ALTER TABLE ... DISTRIBUTED BY ... BUCKETS ... when data volume or cluster size changes.

Quick Start

Use the starrocks-bucketing skill to design your StarRocks table distribution by selecting the right distribution key, bucket count, and colocate join settings for your expected data size and join patterns.

Frequently Asked Questions about starrocks-bucketing

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

FAQPage Schema
How do I choose the right bucket count and distribution key for a StarRocks table?

To choose StarRocks table bucketing, you select distribution keys and a bucket count based on your BE_count and expected compressed data size, targeting 1–10 GB per tablet to balance parallelism and metadata overhead.

When should I use DISTRIBUTED BY HASH versus DISTRIBUTED BY RANDOM in StarRocks?

Use DISTRIBUTED BY HASH when you need to optimize join locality or specific query patterns, and DISTRIBUTED BY RANDOM when you lack a suitable distribution key and need to prevent skew across tablets.

How do I configure colocate joins in StarRocks to avoid shuffle overhead?

To configure StarRocks colocate joins, you apply the colocate_with property consistently across frequently joined tables, ensuring they share identical distribution keys and bucket counts to enable local joins.

Why is my StarRocks data distribution skewed and how do I fix it?

StarRocks tablet skew occurs when distribution keys have uneven value distributions; you diagnose it by measuring skew ratios and resolve it by adjusting distribution keys or switching from HASH to RANDOM distribution.

Can I change the bucket count of an existing StarRocks table after scaling BE nodes?

Yes, you can safely evolve StarRocks bucket counts after cluster growth or BE scaling by applying the ALTER TABLE ... DISTRIBUTED BY ... BUCKETS ... command to redistribute data appropriately.

What is the recommended tablet size for StarRocks OLAP tables?

The recommended StarRocks tablet size is approximately 5 GB, kept within a 1–10 GB range, to effectively balance query parallelism against metadata and compaction overhead.