starrocks-data-modeling

Designs StarRocks OLAP schemas with sort keys, distribution, partitioning, and indexes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves slow or inefficient StarRocks analytical performance caused by poorly chosen schema shapes, keys, and indexing strategies, especially when translating requirements into practical DDL and loading patterns.

Core Features & Use Cases

  • Choose the right table shape: Compare star schema, wide tables, and aggregation tables to match BI dashboard access patterns and minimize expensive joins.
  • Design for StarRocks storage mechanics: Select sort keys (ORDER BY), distribution strategy (DISTRIBUTED BY), partitioning, and compression so queries skip irrelevant granules and scan/aggregate efficiently.
  • Accelerate common filters: Add bitmap indexes for low-cardinality predicates and bloom filter columns for high-cardinality equality filters.
  • Implement robust history and BI acceleration: Use SCD Type 2 patterns with Primary Key tables for point-in-time joins and design aggregation tables (Aggregate Key) for repeated metric queries.
  • Validate and avoid anti-patterns: Prevent over-normalization, incorrect index usage, and mismatched grain that leads to expensive queries or frequent rebuilds.

Quick Start

Ask the AI to design a StarRocks data model for your BI workload and provide the preferred table type (star schema, wide table, or aggregation table) including DDL choices for sort key, distribution, partitioning, and relevant indexes.

Frequently Asked Questions about starrocks-data-modeling

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

FAQPage Schema
How do I design a StarRocks data model for fast BI dashboard queries?

Designing StarRocks data models for BI requires aligning schema shapes with scan-and-aggregate mechanics. You choose between star schemas, wide tables, and aggregation tables to match dashboard access patterns and minimize expensive joins.

What is the best way to use sort keys and distribution keys in StarRocks?

Sort keys (ORDER BY) and distribution strategies (DISTRIBUTED BY) in StarRocks optimize storage mechanics so queries skip irrelevant granules. Proper partitioning and compression further ensure queries scan and aggregate efficiently.

When should I use bitmap indexes vs bloom filters in StarRocks?

Use bitmap indexes in StarRocks for low-cardinality predicates to accelerate common filters. Apply bloom filter columns for high-cardinality equality filters to ensure optimal query performance.

How do I implement SCD Type 2 patterns in StarRocks?

Implementing SCD Type 2 in StarRocks uses Primary Key tables for point-in-time joins. This UPSERT design maintains robust historical data tracking for dimensional schemas.

When do I need aggregation tables in StarRocks?

You need StarRocks aggregation tables, using the Aggregate Key model, for repeated metric queries. They design pre-aggregation grains correctly to accelerate BI dashboard workloads.

What are common anti-patterns to avoid in StarRocks data modeling?

Common StarRocks data modeling anti-patterns include over-normalization, incorrect index usage, and mismatched grains. Preventing these avoids expensive queries and frequent schema rebuilds.