[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-apache-doris-best-practices":3,"mdc--c50axy-key":38,"related-repo-apache-doris-best-practices":2973,"related-org-apache-doris-best-practices":3058},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":33,"sourceUrl":36,"mdContent":37},"doris-best-practices","optimize Apache Doris table design and clusters","Apache Doris table design and cluster sizing best practices. MUST USE when writing, reviewing, or optimizing Doris CREATE TABLE statements, partition\u002Fbucket strategies, data models, or cluster configurations. ALSO MUST USE whenever the doris-architecture-advisor skill produces DDL — apply the Pre-Flight Checklist to every CREATE TABLE before output. Also triggers on any workload design involving: IoT, analytics, dashboard, CDC, time-series, log analysis, real-time warehouse, point query, data platform, or any scenario where table design decisions are being made. Also triggers on replacing or migrating from legacy analytics\u002Fsearch\u002Fserving stacks such as Impala, Kudu, Elasticsearch\u002FES, Greenplum, Presto, HBase, Hive, Hadoop, Redis, or Lambda-style multi-engine data platforms, even when Apache Doris is not named explicitly. Also use when user provides an Apache Doris connection string or asks to get started. Also triggers on slow query investigation, query profiling, runtime performance diagnosis, tablet skew analysis, and table health checks — any scenario where runtime evidence (profile output, tablet distribution) informs optimization. Cluster lifecycle, billing, and networking are managed-service operations, out of scope here — use your platform's cluster-management console for those.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"apache","Apache Software Foundation","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fapache.png",[12,16,19],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":17,"slug":18,"type":15},"Database","database",{"name":20,"slug":21,"type":15},"Engineering","engineering",19,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fdoris-skills","2026-07-12T08:35:32.619438","Apache-2.0",4,[28,29,18,30,31,32],"agent","cli","doris","mcp","skills",{"repoUrl":23,"stars":22,"forks":26,"topics":34,"description":35},[28,29,18,30,31,32],"Agent skills for Apache Doris","https:\u002F\u002Fgithub.com\u002Fapache\u002Fdoris-skills\u002Ftree\u002FHEAD\u002Fskills\u002Fdoris-best-practices","---\nname: doris-best-practices\ndescription: >\n  Apache Doris table design and cluster sizing best practices.\n  MUST USE when writing, reviewing, or optimizing Doris CREATE TABLE statements,\n  partition\u002Fbucket strategies, data models, or cluster configurations.\n  ALSO MUST USE whenever the doris-architecture-advisor skill produces DDL — apply\n  the Pre-Flight Checklist to every CREATE TABLE before output.\n  Also triggers on any workload design involving: IoT, analytics, dashboard, CDC,\n  time-series, log analysis, real-time warehouse, point query, data platform, or\n  any scenario where table design decisions are being made.\n  Also triggers on replacing or migrating from legacy analytics\u002Fsearch\u002Fserving\n  stacks such as Impala, Kudu, Elasticsearch\u002FES, Greenplum, Presto, HBase,\n  Hive, Hadoop, Redis, or Lambda-style multi-engine data platforms, even when\n  Apache Doris is not named explicitly.\n  Also use when user provides an Apache Doris connection string or asks to get started.\n  Also triggers on slow query investigation, query profiling, runtime performance\n  diagnosis, tablet skew analysis, and table health checks — any scenario where\n  runtime evidence (profile output, tablet distribution) informs optimization.\n  Cluster lifecycle, billing, and networking are managed-service operations, out of\n  scope here — use your platform's cluster-management console for those.\nlicense: Apache-2.0\nmetadata:\n  author: tomz-alt\n  version: \"0.1.0\"\n---\n\n# Apache Doris Best Practices\n\n> Problem-first table design intelligence for Apache Doris.\n> 37 rules, 7 use case templates, 4 sizing guides.\n> All details in `references\u002F` directory.\n\n---\n\n## 1 ▸ Problem-First Routing\n\n### I need to build…\n\n| Problem | Template(s) | Key Rules |\n|---------|-------------|-----------|\n| Real-time log\u002Fevent analytics | `usecase-log-event` | DUPLICATE, RANGE partition, dynamic TTL, ZSTD |\n| CDC \u002F MySQL sync to Doris | `usecase-cdc-sync` | UNIQUE MoW, sequence_col, HASH bucket |\n| Dashboard with pre-aggregated metrics | `usecase-dashboard-metrics` | AGGREGATE, BITMAP_UNION, sync MV |\n| User-facing API with low-latency point queries | `usecase-point-query` | UNIQUE MoW, store_row_column, BloomFilter |\n| Star schema with JOIN-heavy analytics | `usecase-star-schema-join` | Colocation, same bucket key\u002Fcount |\n| Small dimension \u002F lookup table | `usecase-dimension-lookup` | DUPLICATE, RANDOM bucket, 3 buckets |\n| Observability (logs + traces + metrics) | `usecase-observability` | 3 tables: DUP logs, DUP traces, AGG metrics |\n| Vehicle\u002Ffleet tracking | `usecase-log-event` + `usecase-point-query` | Time-series + point-query hybrid |\n| E-commerce order analytics | `usecase-star-schema-join` + `usecase-dashboard-metrics` | Star schema + AGG rollups |\n| Full-text search \u002F content search | `schema-index-text-search` | Inverted index, MATCH, BM25 |\n| User behavior \u002F funnel analysis | `schema-types-bitmap-count-distinct` | BITMAP_UNION, bitmap_intersect |\n| Semi-structured JSON data | `schema-types-variant-json` | VARIANT type, schema_template |\n\n### My query is slow after evidence shows…\n\nFor live slow-query or runtime diagnosis, do **not** use this table as the first response. First read `references\u002Fcli-investigation.md` and collect or attempt evidence (`profile get`, `profile list`, `profile history`, `tablet`, `EXPLAIN`, or `auth status`). Use this table only after evidence points to the symptom.\n\n| Symptom | Check These Rules | Quick Fix |\n|---------|------------------|-----------|\n| Full table scan on WHERE clause | `schema-keys-selectivity-first` | Move filtered column to sort key position 1 |\n| JOINs are slow \u002F shuffle | `usecase-star-schema-join` | Small dims (\u003C1GB): broadcast + runtime filter. Large: colocation |\n| COUNT DISTINCT is slow | `schema-types-bitmap-count-distinct` | Switch to BITMAP_UNION aggregation |\n| LIKE '%keyword%' is slow | `schema-index-ngram-for-like` | Add NGram BloomFilter index |\n| Point query latency too high | `usecase-point-query` | Enable store_row_column + Prepared Statement |\n| Storage growing too fast | `schema-partition-auto-on-demand` + `schema-props-compression` | AUTO PARTITION + ZSTD compression + scheduled DROP PARTITION |\n| Sync MV not being used | `schema-mv-sync-rollup` | Use raw columns (not date_trunc) in MV GROUP BY; unique aliases |\n| Async MV rewrite fails | `schema-mv-async-join` + `schema-mv-async-limits` | Check State\u002FRefreshState; query MV directly if predicate fails |\n| Data skew \u002F hot tablets | `schema-bucket-composite-for-skew` | Composite bucket key or RANDOM |\n| Import fails \u002F data version error | `schema-mv-async-limits` | Check concurrent MV refresh limit (max 3) |\n| VARCHAR in key kills perf | `schema-keys-fixed-length-types` | Move VARCHAR after fixed-length types |\n| Writes slow on UNIQUE table | `schema-model-prefer-mow` | Ensure MoW is enabled (not MoR) |\n\n---\n\n## 2 ▸ Pre-Flight Checklist (Before Any CREATE TABLE)\n\nRun through this checklist in order. Each step references the relevant rule:\n\n- [ ] **Data model** — UNIQUE (updates?) vs DUPLICATE (append?) vs AGGREGATE (pre-agg only?) → `schema-model-choose-for-workload`\n- [ ] **Partition strategy** — Time-series? AUTO PARTITION preferred. Small table? Skip. Do NOT combine AUTO with dynamic_partition. → `schema-partition-*`\n- [ ] **Bucket key + count** — HASH on JOIN key. Calculate explicit count: `daily_GB \u002F target_tablet_GB`. Use explicit fallback counts when volume is unknown: 3 for small dimensions, 8 for medium tables, 16-32 for large daily fact tables. → `schema-bucket-*`\n- [ ] **Sort key order** — High-selectivity first, fixed-length before VARCHAR → `schema-keys-*`\n- [ ] **Data types** — Native types, not STRING. DECIMAL not FLOAT. → `schema-types-*`\n- [ ] **Indexes** — BloomFilter for equality, Inverted for text, NGram for LIKE → `schema-index-*`\n- [ ] **Properties** — MoW enabled? Compression? Cloud mode replication_num=1? → `schema-props-*`\n- [ ] **DDL hard constraints** (Apache Doris rejects DDL if any violated):\n  - UNIQUE KEY + PARTITION BY RANGE → partition column MUST be in the UNIQUE KEY: `UNIQUE KEY(id, dt) PARTITION BY RANGE(dt)`\n  - Key columns must be the FIRST N columns in schema, same order — put key cols first, non-key after. Example: `UNIQUE KEY(account_id, symbol)` means schema must start with `account_id, symbol, ...` — never place non-key columns between key columns\n  - `store_row_column = \"true\"` works on UNIQUE MoW and DUPLICATE — NOT on AGGREGATE (Doris rejects AGG: \"Aggregate table can't support row column\"). Verified on 4.x; older versions were UNIQUE-only\n  - AUTO PARTITION requires `date_trunc()` AND empty parens: `AUTO PARTITION BY RANGE(date_trunc(col, 'day')) ()` — bare column name fails, missing `()` fails\n  - Dynamic partition requires explicit `PARTITION BY RANGE(col) ()` clause in DDL — properties alone are not enough\n  - Do not set `dynamic_partition.buckets`; put the numeric count only in `DISTRIBUTED BY HASH(col) BUCKETS N`\n  - `compaction_policy = \"time_series\"` only for DUPLICATE tables — fails on UNIQUE\n  - Async MV refresh: use `REFRESH AUTO ON SCHEDULE EVERY 10 MINUTE` or `REFRESH COMPLETE ON SCHEDULE EVERY 10 MINUTE` — NOT `REFRESH SCHEDULE EVERY`, NOT `REFRESH ASYNC EVERY(INTERVAL ...)`. Minimum interval: 1 MINUTE\n  - MV using `NOW()`\u002F`CURDATE()`: add `PROPERTIES (\"enable_nondeterministic_function\" = \"true\")`\n  - BOOLEAN defaults must be quoted: `DEFAULT \"true\"` not `DEFAULT TRUE`\n  - BloomFilter index: use `PROPERTIES (\"bloom_filter_columns\" = \"col1,col2\")` — NOT inline `INDEX ... USING BLOOM FILTER`\n  - AGGREGATE column syntax: aggregation function BEFORE default: `col BIGINT SUM DEFAULT \"0\"` — NOT `col BIGINT DEFAULT \"0\" SUM`\n  - AGGREGATE `DEFAULT \"null\"` only works for VARCHAR — fails on INT, DATE, DECIMAL, BIGINT. Omit DEFAULT entirely for REPLACE_IF_NOT_NULL on non-string types: `vip_level INT REPLACE_IF_NOT_NULL` (not `DEFAULT \"null\"`)\n  - `enable_unique_key_partial_update` is a session variable, NOT a table property\n  - Full details: `schema-ddl-gotchas`\n\n---\n\n## 2b ▸ DDL Templates (copy the closest match, customize columns)\n\nFor each CREATE TABLE, select the closest template below. Customize column names, types, bucket count, and partition settings. Do NOT write DDL from scratch.\n\n### T1: Append-only events\u002Flogs (DUPLICATE)\n```sql\nCREATE TABLE events (\n    entity_id    VARCHAR(64)  NOT NULL,\n    event_time   DATETIME     NOT NULL,\n    event_type   VARCHAR(50)  NOT NULL,\n    payload      VARIANT\n) DUPLICATE KEY(entity_id, event_time, event_type)\nPARTITION BY RANGE(event_time) ()\nDISTRIBUTED BY HASH(entity_id) BUCKETS 10\nPROPERTIES (\n    \"dynamic_partition.enable\" = \"true\",\n    \"dynamic_partition.time_unit\" = \"DAY\",\n    \"dynamic_partition.start\" = \"-90\",\n    \"dynamic_partition.end\" = \"3\",\n    \"dynamic_partition.prefix\" = \"p\",\n    \"compression\" = \"zstd\",\n    \"compaction_policy\" = \"time_series\",\n    \"replication_num\" = \"1\"\n);\n```\n\n### T2: Updatable with partition (UNIQUE MoW + CDC)\n```sql\nCREATE TABLE orders (\n    order_id     BIGINT       NOT NULL,\n    order_time   DATETIME     NOT NULL,\n    update_time  DATETIME     NOT NULL,\n    status       VARCHAR(20),\n    amount       DECIMAL(18,2)\n) UNIQUE KEY(order_id, order_time)\nPARTITION BY RANGE(order_time) ()\nDISTRIBUTED BY HASH(order_id) BUCKETS 5\nPROPERTIES (\n    \"enable_unique_key_merge_on_write\" = \"true\",\n    \"function_column.sequence_col\" = \"update_time\",\n    \"dynamic_partition.enable\" = \"true\",\n    \"dynamic_partition.time_unit\" = \"DAY\",\n    \"dynamic_partition.start\" = \"-365\",\n    \"dynamic_partition.end\" = \"3\",\n    \"dynamic_partition.prefix\" = \"p\",\n    \"replication_num\" = \"1\"\n);\n```\n\n### T3: Small dimension \u002F lookup (UNIQUE, no partition)\n```sql\nCREATE TABLE dim_product (\n    product_id   INT          NOT NULL,\n    name         VARCHAR(200),\n    category     VARCHAR(50)\n) UNIQUE KEY(product_id)\nDISTRIBUTED BY HASH(product_id) BUCKETS 3\nPROPERTIES (\n    \"enable_unique_key_merge_on_write\" = \"true\",\n    \"replication_num\" = \"1\"\n);\n```\n\n### T4: Pre-aggregated KPIs (AGGREGATE)\n```sql\nCREATE TABLE daily_kpi (\n    stat_date    DATE         NOT NULL,\n    dimension    VARCHAR(50)  NOT NULL,\n    metric_sum   BIGINT       SUM DEFAULT \"0\",\n    metric_max   DOUBLE       MAX DEFAULT \"0\",\n    unique_users BITMAP       BITMAP_UNION\n) AGGREGATE KEY(stat_date, dimension)\nPARTITION BY RANGE(stat_date) ()\nDISTRIBUTED BY HASH(dimension) BUCKETS 3\nPROPERTIES (\n    \"dynamic_partition.enable\" = \"true\",\n    \"dynamic_partition.time_unit\" = \"MONTH\",\n    \"dynamic_partition.start\" = \"-12\",\n    \"dynamic_partition.end\" = \"1\",\n    \"dynamic_partition.prefix\" = \"p\",\n    \"replication_num\" = \"1\"\n);\n```\n\n### T5: Point query \u002F API serving (UNIQUE MoW + row store)\n```sql\nCREATE TABLE user_profiles (\n    user_id      BIGINT       NOT NULL,\n    update_time  DATETIME     NOT NULL,\n    name         VARCHAR(100),\n    data         VARIANT\n) UNIQUE KEY(user_id)\nDISTRIBUTED BY HASH(user_id) BUCKETS 5\nPROPERTIES (\n    \"enable_unique_key_merge_on_write\" = \"true\",\n    \"function_column.sequence_col\" = \"update_time\",\n    \"store_row_column\" = \"true\",\n    \"light_schema_change\" = \"true\",\n    \"replication_num\" = \"1\"\n);\n```\n\n---\n\n## 3 ▸ Connection & CLI\n\nApache Doris speaks the MySQL protocol, so the **always-available** path is any MySQL-compatible client (`mysql`) plus SQL and the FE HTTP REST API. Some distributions also ship an **optional management CLI** (referred to here as `doriscli`) that adds ergonomic profiling and diagnostics commands — use it when your distribution provides one, otherwise use the native path.\n\n### Detect the optional CLI\n\nBefore running any queries, detect whether the CLI binary is available:\n\n1. Check `DORIS_CLI_PATH` env var — if set, use that binary path\n2. `command -v doriscli` — use from PATH\n3. If none available: fall back to `mysql` client (see `references\u002Fstart-*.md`)\n\n### When doriscli is available, prefer it for all operations:\n\n| Task | doriscli Command |\n|------|-----------------|\n| Run SQL | `doriscli sql \"SELECT ...\"` |\n| DDL inspection | `doriscli sql \"SHOW CREATE TABLE db.t\"` |\n| Table\u002Ftablet health | `doriscli tablet db.t` (overview) or `doriscli tablet db.t --detail` |\n| Profile a slow query | `doriscli sql \"SELECT ...\" --profile` → captures query_id |\n| Get query profile | `doriscli profile get \u003Cqid>` or `--full` for complete diagnosis |\n| Compare fast vs slow | `doriscli profile diff \u003Cslow_qid> \u003Cfast_qid>` |\n| Performance trend | `doriscli profile history \u003Csql_pattern> --days 7` |\n| Test connection | `doriscli auth status` |\n| Switch environment | `doriscli use \u003Cname>` |\n\n### Runtime Query Investigation\n\nFor slow queries or runtime performance issues, read `references\u002Fcli-investigation.md`.\n\n- **Evidence first is mandatory**: collect or attempt profile, tablet, DDL, stats, EXPLAIN, history, active-query, or connection evidence before forming hypotheses. If evidence cannot be collected locally, state that and provide the exact commands to run\n- **Prefer existing profiles**: use `profile get \u003Cquery_id>`, `profile list`, or `profile history` before re-executing SQL\n- **Proactive discovery**: for vague slow-query reports, start with `auth status`, `profile list --active`, and recent `profile list` before asking the user for more context\n- **Safety gate**: before running user SQL with `--profile`, check whether it is safe (no DDL, no mutation, no unbounded scan). For unknown, peak-hour, or expensive SQL, run `doriscli sql \"EXPLAIN \u003Cquery>\" --format json` first and ask confirmation or request an existing query_id\n- **Hypotheses, not verdicts**: diagnostic mappings are heuristics. Present evidence, likely cause, what to check next, and when the conclusion may be wrong\n- If doriscli is unavailable, fall back to SQL commands listed in the reference\n- Always use `--format json` for structured agent-readable output\n\n### Quick-start guides\n\n- `references\u002Fstart-self-hosted.md` — Self-hosted \u002F BYOC \u002F on-prem\n- Cloud mode (storage-compute) connection differs only in the HTTP port (8080 vs 8030) — same guide applies\n\n---\n\n## 4 ▸ Cluster Sizing\n\nSizing guides are in:\n- `references\u002Fsizing-fe.md` — FE node sizing\n- `references\u002Fsizing-be-integrated.md` — BE sizing (integrated storage)\n- `references\u002Fsizing-be-cloud.md` — BE sizing (cloud \u002F storage-compute)\n- `references\u002Fsizing-storage-formula.md` — Storage calculation formula\n\n---\n\n## 5 ▸ Rule Index by Category\n\n### Data Model — CRITICAL (4 rules)\n- `schema-model-choose-for-workload` — DUP vs UNIQUE vs AGG decision tree\n- `schema-model-prefer-mow` — Always MoW for UNIQUE tables\n- `schema-model-avoid-agg-for-updates` — AGG cannot UPDATE\u002FDELETE\n- `schema-model-sequence-col-for-cdc` — Sequence column for out-of-order CDC\n\n### Partition Strategy — CRITICAL (4 rules)\n- `schema-partition-range-for-timeseries` — RANGE for time-series\n- `schema-partition-dynamic-ttl` — Dynamic partition for automated TTL\n- `schema-partition-auto-on-demand` — AUTO for sporadic data\n- `schema-partition-skip-for-small` — Skip partitioning under 1 GB\n\n### Bucket Strategy — CRITICAL (5 rules)\n- `schema-bucket-hash-vs-random` — HASH for pruning, RANDOM for DUP only\n- `schema-bucket-high-cardinality-key` — Choose high-cardinality column\n- `schema-bucket-composite-for-skew` — Composite key to fix data skew\n- `schema-bucket-target-size` — Target 1-10 GB per tablet\n- `schema-bucket-cloud-mandatory-hash` — Cloud MoW requires HASH\n\n### Sort Key — CRITICAL (5 rules)\n- `schema-keys-selectivity-first` — High selectivity first\n- `schema-keys-fixed-length-types` — Fixed-length before VARCHAR\n- `schema-keys-prefix-index-limits` — 36 bytes max, VARCHAR terminates it\n- `schema-keys-cluster-key-for-mow` — Cluster key for UNIQUE tables\n- `schema-keys-avoid-float` — No FLOAT\u002FDOUBLE in sort key\n\n### Data Types — HIGH (5 rules)\n- `schema-types-native-vs-string` — Native types, not STRING\n- `schema-types-zonemap-limitations` — JSON\u002FARRAY disable ZoneMap\n- `schema-types-variant-json` — VARIANT for semi-structured JSON\n- `schema-types-bitmap-count-distinct` — BITMAP_UNION for exact count-distinct\n- `schema-types-doris-specifics` — DATETIME precision, VARCHAR vs STRING\n\n### Indexes — HIGH (7 rules)\n- `schema-index-bloomfilter` — BloomFilter for equality\n- `schema-index-inverted` — Inverted for text\u002Frange\n- `schema-index-ngram-for-like` — NGram for LIKE %pattern%\n- `schema-index-bitmap` — Bitmap for medium cardinality\n- `schema-index-vector` — HNSW\u002FIVF for ANN search\n- `schema-index-text-search` — Full-text MATCH + BM25\n\n### Query Acceleration — HIGH (3 rules)\n- `schema-mv-sync-rollup` — Sync MV for single-table aggregation\n- `schema-mv-async-join` — Async MV for multi-table JOIN\n- `schema-mv-async-limits` — Operational limits (50M rows, 3 concurrent)\n\n### Table Properties — HIGH\u002FMEDIUM (2 rules)\n- `schema-props-cloud-forced` — Cloud mode forced properties\n- `schema-props-compression` — LZ4 vs ZSTD compression\n\n### Caching — MEDIUM (2 rules)\n- `schema-cache-file-cache` — File cache for cloud mode\n- `schema-cache-query-partition` — Query and partition cache\n",{"data":39,"body":43},{"name":4,"description":6,"license":25,"metadata":40},{"author":41,"version":42},"tomz-alt","0.1.0",{"type":44,"children":45},"root",[46,55,74,78,85,92,400,406,472,773,776,782,787,1257,1260,1266,1271,1277,1451,1457,1609,1615,1698,1704,1842,1848,1961,1964,1970,2005,2011,2016,2063,2069,2263,2269,2281,2409,2415,2434,2437,2443,2448,2495,2498,2504,2510,2555,2561,2607,2613,2670,2676,2732,2738,2794,2800,2867,2873,2906,2912,2936,2942,2967],{"type":47,"tag":48,"props":49,"children":51},"element","h1",{"id":50},"apache-doris-best-practices",[52],{"type":53,"value":54},"text","Apache Doris Best Practices",{"type":47,"tag":56,"props":57,"children":58},"blockquote",{},[59],{"type":47,"tag":60,"props":61,"children":62},"p",{},[63,65,72],{"type":53,"value":64},"Problem-first table design intelligence for Apache Doris.\n37 rules, 7 use case templates, 4 sizing guides.\nAll details in ",{"type":47,"tag":66,"props":67,"children":69},"code",{"className":68},[],[70],{"type":53,"value":71},"references\u002F",{"type":53,"value":73}," directory.",{"type":47,"tag":75,"props":76,"children":77},"hr",{},[],{"type":47,"tag":79,"props":80,"children":82},"h2",{"id":81},"_1-problem-first-routing",[83],{"type":53,"value":84},"1 ▸ Problem-First Routing",{"type":47,"tag":86,"props":87,"children":89},"h3",{"id":88},"i-need-to-build",[90],{"type":53,"value":91},"I need to build…",{"type":47,"tag":93,"props":94,"children":95},"table",{},[96,120],{"type":47,"tag":97,"props":98,"children":99},"thead",{},[100],{"type":47,"tag":101,"props":102,"children":103},"tr",{},[104,110,115],{"type":47,"tag":105,"props":106,"children":107},"th",{},[108],{"type":53,"value":109},"Problem",{"type":47,"tag":105,"props":111,"children":112},{},[113],{"type":53,"value":114},"Template(s)",{"type":47,"tag":105,"props":116,"children":117},{},[118],{"type":53,"value":119},"Key Rules",{"type":47,"tag":121,"props":122,"children":123},"tbody",{},[124,147,169,191,213,235,257,279,307,334,356,378],{"type":47,"tag":101,"props":125,"children":126},{},[127,133,142],{"type":47,"tag":128,"props":129,"children":130},"td",{},[131],{"type":53,"value":132},"Real-time log\u002Fevent analytics",{"type":47,"tag":128,"props":134,"children":135},{},[136],{"type":47,"tag":66,"props":137,"children":139},{"className":138},[],[140],{"type":53,"value":141},"usecase-log-event",{"type":47,"tag":128,"props":143,"children":144},{},[145],{"type":53,"value":146},"DUPLICATE, RANGE partition, dynamic TTL, ZSTD",{"type":47,"tag":101,"props":148,"children":149},{},[150,155,164],{"type":47,"tag":128,"props":151,"children":152},{},[153],{"type":53,"value":154},"CDC \u002F MySQL sync to Doris",{"type":47,"tag":128,"props":156,"children":157},{},[158],{"type":47,"tag":66,"props":159,"children":161},{"className":160},[],[162],{"type":53,"value":163},"usecase-cdc-sync",{"type":47,"tag":128,"props":165,"children":166},{},[167],{"type":53,"value":168},"UNIQUE MoW, sequence_col, HASH bucket",{"type":47,"tag":101,"props":170,"children":171},{},[172,177,186],{"type":47,"tag":128,"props":173,"children":174},{},[175],{"type":53,"value":176},"Dashboard with pre-aggregated metrics",{"type":47,"tag":128,"props":178,"children":179},{},[180],{"type":47,"tag":66,"props":181,"children":183},{"className":182},[],[184],{"type":53,"value":185},"usecase-dashboard-metrics",{"type":47,"tag":128,"props":187,"children":188},{},[189],{"type":53,"value":190},"AGGREGATE, BITMAP_UNION, sync MV",{"type":47,"tag":101,"props":192,"children":193},{},[194,199,208],{"type":47,"tag":128,"props":195,"children":196},{},[197],{"type":53,"value":198},"User-facing API with low-latency point queries",{"type":47,"tag":128,"props":200,"children":201},{},[202],{"type":47,"tag":66,"props":203,"children":205},{"className":204},[],[206],{"type":53,"value":207},"usecase-point-query",{"type":47,"tag":128,"props":209,"children":210},{},[211],{"type":53,"value":212},"UNIQUE MoW, store_row_column, BloomFilter",{"type":47,"tag":101,"props":214,"children":215},{},[216,221,230],{"type":47,"tag":128,"props":217,"children":218},{},[219],{"type":53,"value":220},"Star schema with JOIN-heavy analytics",{"type":47,"tag":128,"props":222,"children":223},{},[224],{"type":47,"tag":66,"props":225,"children":227},{"className":226},[],[228],{"type":53,"value":229},"usecase-star-schema-join",{"type":47,"tag":128,"props":231,"children":232},{},[233],{"type":53,"value":234},"Colocation, same bucket key\u002Fcount",{"type":47,"tag":101,"props":236,"children":237},{},[238,243,252],{"type":47,"tag":128,"props":239,"children":240},{},[241],{"type":53,"value":242},"Small dimension \u002F lookup table",{"type":47,"tag":128,"props":244,"children":245},{},[246],{"type":47,"tag":66,"props":247,"children":249},{"className":248},[],[250],{"type":53,"value":251},"usecase-dimension-lookup",{"type":47,"tag":128,"props":253,"children":254},{},[255],{"type":53,"value":256},"DUPLICATE, RANDOM bucket, 3 buckets",{"type":47,"tag":101,"props":258,"children":259},{},[260,265,274],{"type":47,"tag":128,"props":261,"children":262},{},[263],{"type":53,"value":264},"Observability (logs + traces + metrics)",{"type":47,"tag":128,"props":266,"children":267},{},[268],{"type":47,"tag":66,"props":269,"children":271},{"className":270},[],[272],{"type":53,"value":273},"usecase-observability",{"type":47,"tag":128,"props":275,"children":276},{},[277],{"type":53,"value":278},"3 tables: DUP logs, DUP traces, AGG metrics",{"type":47,"tag":101,"props":280,"children":281},{},[282,287,302],{"type":47,"tag":128,"props":283,"children":284},{},[285],{"type":53,"value":286},"Vehicle\u002Ffleet tracking",{"type":47,"tag":128,"props":288,"children":289},{},[290,295,297],{"type":47,"tag":66,"props":291,"children":293},{"className":292},[],[294],{"type":53,"value":141},{"type":53,"value":296}," + ",{"type":47,"tag":66,"props":298,"children":300},{"className":299},[],[301],{"type":53,"value":207},{"type":47,"tag":128,"props":303,"children":304},{},[305],{"type":53,"value":306},"Time-series + point-query hybrid",{"type":47,"tag":101,"props":308,"children":309},{},[310,315,329],{"type":47,"tag":128,"props":311,"children":312},{},[313],{"type":53,"value":314},"E-commerce order analytics",{"type":47,"tag":128,"props":316,"children":317},{},[318,323,324],{"type":47,"tag":66,"props":319,"children":321},{"className":320},[],[322],{"type":53,"value":229},{"type":53,"value":296},{"type":47,"tag":66,"props":325,"children":327},{"className":326},[],[328],{"type":53,"value":185},{"type":47,"tag":128,"props":330,"children":331},{},[332],{"type":53,"value":333},"Star schema + AGG rollups",{"type":47,"tag":101,"props":335,"children":336},{},[337,342,351],{"type":47,"tag":128,"props":338,"children":339},{},[340],{"type":53,"value":341},"Full-text search \u002F content search",{"type":47,"tag":128,"props":343,"children":344},{},[345],{"type":47,"tag":66,"props":346,"children":348},{"className":347},[],[349],{"type":53,"value":350},"schema-index-text-search",{"type":47,"tag":128,"props":352,"children":353},{},[354],{"type":53,"value":355},"Inverted index, MATCH, BM25",{"type":47,"tag":101,"props":357,"children":358},{},[359,364,373],{"type":47,"tag":128,"props":360,"children":361},{},[362],{"type":53,"value":363},"User behavior \u002F funnel analysis",{"type":47,"tag":128,"props":365,"children":366},{},[367],{"type":47,"tag":66,"props":368,"children":370},{"className":369},[],[371],{"type":53,"value":372},"schema-types-bitmap-count-distinct",{"type":47,"tag":128,"props":374,"children":375},{},[376],{"type":53,"value":377},"BITMAP_UNION, bitmap_intersect",{"type":47,"tag":101,"props":379,"children":380},{},[381,386,395],{"type":47,"tag":128,"props":382,"children":383},{},[384],{"type":53,"value":385},"Semi-structured JSON data",{"type":47,"tag":128,"props":387,"children":388},{},[389],{"type":47,"tag":66,"props":390,"children":392},{"className":391},[],[393],{"type":53,"value":394},"schema-types-variant-json",{"type":47,"tag":128,"props":396,"children":397},{},[398],{"type":53,"value":399},"VARIANT type, schema_template",{"type":47,"tag":86,"props":401,"children":403},{"id":402},"my-query-is-slow-after-evidence-shows",[404],{"type":53,"value":405},"My query is slow after evidence shows…",{"type":47,"tag":60,"props":407,"children":408},{},[409,411,417,419,425,427,433,435,441,442,448,449,455,456,462,464,470],{"type":53,"value":410},"For live slow-query or runtime diagnosis, do ",{"type":47,"tag":412,"props":413,"children":414},"strong",{},[415],{"type":53,"value":416},"not",{"type":53,"value":418}," use this table as the first response. First read ",{"type":47,"tag":66,"props":420,"children":422},{"className":421},[],[423],{"type":53,"value":424},"references\u002Fcli-investigation.md",{"type":53,"value":426}," and collect or attempt evidence (",{"type":47,"tag":66,"props":428,"children":430},{"className":429},[],[431],{"type":53,"value":432},"profile get",{"type":53,"value":434},", ",{"type":47,"tag":66,"props":436,"children":438},{"className":437},[],[439],{"type":53,"value":440},"profile list",{"type":53,"value":434},{"type":47,"tag":66,"props":443,"children":445},{"className":444},[],[446],{"type":53,"value":447},"profile history",{"type":53,"value":434},{"type":47,"tag":66,"props":450,"children":452},{"className":451},[],[453],{"type":53,"value":454},"tablet",{"type":53,"value":434},{"type":47,"tag":66,"props":457,"children":459},{"className":458},[],[460],{"type":53,"value":461},"EXPLAIN",{"type":53,"value":463},", or ",{"type":47,"tag":66,"props":465,"children":467},{"className":466},[],[468],{"type":53,"value":469},"auth status",{"type":53,"value":471},"). Use this table only after evidence points to the symptom.",{"type":47,"tag":93,"props":473,"children":474},{},[475,496],{"type":47,"tag":97,"props":476,"children":477},{},[478],{"type":47,"tag":101,"props":479,"children":480},{},[481,486,491],{"type":47,"tag":105,"props":482,"children":483},{},[484],{"type":53,"value":485},"Symptom",{"type":47,"tag":105,"props":487,"children":488},{},[489],{"type":53,"value":490},"Check These Rules",{"type":47,"tag":105,"props":492,"children":493},{},[494],{"type":53,"value":495},"Quick Fix",{"type":47,"tag":121,"props":497,"children":498},{},[499,521,542,563,585,606,635,657,686,708,729,751],{"type":47,"tag":101,"props":500,"children":501},{},[502,507,516],{"type":47,"tag":128,"props":503,"children":504},{},[505],{"type":53,"value":506},"Full table scan on WHERE clause",{"type":47,"tag":128,"props":508,"children":509},{},[510],{"type":47,"tag":66,"props":511,"children":513},{"className":512},[],[514],{"type":53,"value":515},"schema-keys-selectivity-first",{"type":47,"tag":128,"props":517,"children":518},{},[519],{"type":53,"value":520},"Move filtered column to sort key position 1",{"type":47,"tag":101,"props":522,"children":523},{},[524,529,537],{"type":47,"tag":128,"props":525,"children":526},{},[527],{"type":53,"value":528},"JOINs are slow \u002F shuffle",{"type":47,"tag":128,"props":530,"children":531},{},[532],{"type":47,"tag":66,"props":533,"children":535},{"className":534},[],[536],{"type":53,"value":229},{"type":47,"tag":128,"props":538,"children":539},{},[540],{"type":53,"value":541},"Small dims (\u003C1GB): broadcast + runtime filter. Large: colocation",{"type":47,"tag":101,"props":543,"children":544},{},[545,550,558],{"type":47,"tag":128,"props":546,"children":547},{},[548],{"type":53,"value":549},"COUNT DISTINCT is slow",{"type":47,"tag":128,"props":551,"children":552},{},[553],{"type":47,"tag":66,"props":554,"children":556},{"className":555},[],[557],{"type":53,"value":372},{"type":47,"tag":128,"props":559,"children":560},{},[561],{"type":53,"value":562},"Switch to BITMAP_UNION aggregation",{"type":47,"tag":101,"props":564,"children":565},{},[566,571,580],{"type":47,"tag":128,"props":567,"children":568},{},[569],{"type":53,"value":570},"LIKE '%keyword%' is slow",{"type":47,"tag":128,"props":572,"children":573},{},[574],{"type":47,"tag":66,"props":575,"children":577},{"className":576},[],[578],{"type":53,"value":579},"schema-index-ngram-for-like",{"type":47,"tag":128,"props":581,"children":582},{},[583],{"type":53,"value":584},"Add NGram BloomFilter index",{"type":47,"tag":101,"props":586,"children":587},{},[588,593,601],{"type":47,"tag":128,"props":589,"children":590},{},[591],{"type":53,"value":592},"Point query latency too high",{"type":47,"tag":128,"props":594,"children":595},{},[596],{"type":47,"tag":66,"props":597,"children":599},{"className":598},[],[600],{"type":53,"value":207},{"type":47,"tag":128,"props":602,"children":603},{},[604],{"type":53,"value":605},"Enable store_row_column + Prepared Statement",{"type":47,"tag":101,"props":607,"children":608},{},[609,614,630],{"type":47,"tag":128,"props":610,"children":611},{},[612],{"type":53,"value":613},"Storage growing too fast",{"type":47,"tag":128,"props":615,"children":616},{},[617,623,624],{"type":47,"tag":66,"props":618,"children":620},{"className":619},[],[621],{"type":53,"value":622},"schema-partition-auto-on-demand",{"type":53,"value":296},{"type":47,"tag":66,"props":625,"children":627},{"className":626},[],[628],{"type":53,"value":629},"schema-props-compression",{"type":47,"tag":128,"props":631,"children":632},{},[633],{"type":53,"value":634},"AUTO PARTITION + ZSTD compression + scheduled DROP PARTITION",{"type":47,"tag":101,"props":636,"children":637},{},[638,643,652],{"type":47,"tag":128,"props":639,"children":640},{},[641],{"type":53,"value":642},"Sync MV not being used",{"type":47,"tag":128,"props":644,"children":645},{},[646],{"type":47,"tag":66,"props":647,"children":649},{"className":648},[],[650],{"type":53,"value":651},"schema-mv-sync-rollup",{"type":47,"tag":128,"props":653,"children":654},{},[655],{"type":53,"value":656},"Use raw columns (not date_trunc) in MV GROUP BY; unique aliases",{"type":47,"tag":101,"props":658,"children":659},{},[660,665,681],{"type":47,"tag":128,"props":661,"children":662},{},[663],{"type":53,"value":664},"Async MV rewrite fails",{"type":47,"tag":128,"props":666,"children":667},{},[668,674,675],{"type":47,"tag":66,"props":669,"children":671},{"className":670},[],[672],{"type":53,"value":673},"schema-mv-async-join",{"type":53,"value":296},{"type":47,"tag":66,"props":676,"children":678},{"className":677},[],[679],{"type":53,"value":680},"schema-mv-async-limits",{"type":47,"tag":128,"props":682,"children":683},{},[684],{"type":53,"value":685},"Check State\u002FRefreshState; query MV directly if predicate fails",{"type":47,"tag":101,"props":687,"children":688},{},[689,694,703],{"type":47,"tag":128,"props":690,"children":691},{},[692],{"type":53,"value":693},"Data skew \u002F hot tablets",{"type":47,"tag":128,"props":695,"children":696},{},[697],{"type":47,"tag":66,"props":698,"children":700},{"className":699},[],[701],{"type":53,"value":702},"schema-bucket-composite-for-skew",{"type":47,"tag":128,"props":704,"children":705},{},[706],{"type":53,"value":707},"Composite bucket key or RANDOM",{"type":47,"tag":101,"props":709,"children":710},{},[711,716,724],{"type":47,"tag":128,"props":712,"children":713},{},[714],{"type":53,"value":715},"Import fails \u002F data version error",{"type":47,"tag":128,"props":717,"children":718},{},[719],{"type":47,"tag":66,"props":720,"children":722},{"className":721},[],[723],{"type":53,"value":680},{"type":47,"tag":128,"props":725,"children":726},{},[727],{"type":53,"value":728},"Check concurrent MV refresh limit (max 3)",{"type":47,"tag":101,"props":730,"children":731},{},[732,737,746],{"type":47,"tag":128,"props":733,"children":734},{},[735],{"type":53,"value":736},"VARCHAR in key kills perf",{"type":47,"tag":128,"props":738,"children":739},{},[740],{"type":47,"tag":66,"props":741,"children":743},{"className":742},[],[744],{"type":53,"value":745},"schema-keys-fixed-length-types",{"type":47,"tag":128,"props":747,"children":748},{},[749],{"type":53,"value":750},"Move VARCHAR after fixed-length types",{"type":47,"tag":101,"props":752,"children":753},{},[754,759,768],{"type":47,"tag":128,"props":755,"children":756},{},[757],{"type":53,"value":758},"Writes slow on UNIQUE table",{"type":47,"tag":128,"props":760,"children":761},{},[762],{"type":47,"tag":66,"props":763,"children":765},{"className":764},[],[766],{"type":53,"value":767},"schema-model-prefer-mow",{"type":47,"tag":128,"props":769,"children":770},{},[771],{"type":53,"value":772},"Ensure MoW is enabled (not MoR)",{"type":47,"tag":75,"props":774,"children":775},{},[],{"type":47,"tag":79,"props":777,"children":779},{"id":778},"_2-pre-flight-checklist-before-any-create-table",[780],{"type":53,"value":781},"2 ▸ Pre-Flight Checklist (Before Any CREATE TABLE)",{"type":47,"tag":60,"props":783,"children":784},{},[785],{"type":53,"value":786},"Run through this checklist in order. Each step references the relevant rule:",{"type":47,"tag":788,"props":789,"children":792},"ul",{"className":790},[791],"contains-task-list",[793,820,841,870,891,912,933,954],{"type":47,"tag":794,"props":795,"children":798},"li",{"className":796},[797],"task-list-item",[799,805,807,812,814],{"type":47,"tag":800,"props":801,"children":804},"input",{"disabled":802,"type":803},true,"checkbox",[],{"type":53,"value":806}," ",{"type":47,"tag":412,"props":808,"children":809},{},[810],{"type":53,"value":811},"Data model",{"type":53,"value":813}," — UNIQUE (updates?) vs DUPLICATE (append?) vs AGGREGATE (pre-agg only?) → ",{"type":47,"tag":66,"props":815,"children":817},{"className":816},[],[818],{"type":53,"value":819},"schema-model-choose-for-workload",{"type":47,"tag":794,"props":821,"children":823},{"className":822},[797],[824,827,828,833,835],{"type":47,"tag":800,"props":825,"children":826},{"disabled":802,"type":803},[],{"type":53,"value":806},{"type":47,"tag":412,"props":829,"children":830},{},[831],{"type":53,"value":832},"Partition strategy",{"type":53,"value":834}," — Time-series? AUTO PARTITION preferred. Small table? Skip. Do NOT combine AUTO with dynamic_partition. → ",{"type":47,"tag":66,"props":836,"children":838},{"className":837},[],[839],{"type":53,"value":840},"schema-partition-*",{"type":47,"tag":794,"props":842,"children":844},{"className":843},[797],[845,848,849,854,856,862,864],{"type":47,"tag":800,"props":846,"children":847},{"disabled":802,"type":803},[],{"type":53,"value":806},{"type":47,"tag":412,"props":850,"children":851},{},[852],{"type":53,"value":853},"Bucket key + count",{"type":53,"value":855}," — HASH on JOIN key. Calculate explicit count: ",{"type":47,"tag":66,"props":857,"children":859},{"className":858},[],[860],{"type":53,"value":861},"daily_GB \u002F target_tablet_GB",{"type":53,"value":863},". Use explicit fallback counts when volume is unknown: 3 for small dimensions, 8 for medium tables, 16-32 for large daily fact tables. → ",{"type":47,"tag":66,"props":865,"children":867},{"className":866},[],[868],{"type":53,"value":869},"schema-bucket-*",{"type":47,"tag":794,"props":871,"children":873},{"className":872},[797],[874,877,878,883,885],{"type":47,"tag":800,"props":875,"children":876},{"disabled":802,"type":803},[],{"type":53,"value":806},{"type":47,"tag":412,"props":879,"children":880},{},[881],{"type":53,"value":882},"Sort key order",{"type":53,"value":884}," — High-selectivity first, fixed-length before VARCHAR → ",{"type":47,"tag":66,"props":886,"children":888},{"className":887},[],[889],{"type":53,"value":890},"schema-keys-*",{"type":47,"tag":794,"props":892,"children":894},{"className":893},[797],[895,898,899,904,906],{"type":47,"tag":800,"props":896,"children":897},{"disabled":802,"type":803},[],{"type":53,"value":806},{"type":47,"tag":412,"props":900,"children":901},{},[902],{"type":53,"value":903},"Data types",{"type":53,"value":905}," — Native types, not STRING. DECIMAL not FLOAT. → ",{"type":47,"tag":66,"props":907,"children":909},{"className":908},[],[910],{"type":53,"value":911},"schema-types-*",{"type":47,"tag":794,"props":913,"children":915},{"className":914},[797],[916,919,920,925,927],{"type":47,"tag":800,"props":917,"children":918},{"disabled":802,"type":803},[],{"type":53,"value":806},{"type":47,"tag":412,"props":921,"children":922},{},[923],{"type":53,"value":924},"Indexes",{"type":53,"value":926}," — BloomFilter for equality, Inverted for text, NGram for LIKE → ",{"type":47,"tag":66,"props":928,"children":930},{"className":929},[],[931],{"type":53,"value":932},"schema-index-*",{"type":47,"tag":794,"props":934,"children":936},{"className":935},[797],[937,940,941,946,948],{"type":47,"tag":800,"props":938,"children":939},{"disabled":802,"type":803},[],{"type":53,"value":806},{"type":47,"tag":412,"props":942,"children":943},{},[944],{"type":53,"value":945},"Properties",{"type":53,"value":947}," — MoW enabled? Compression? Cloud mode replication_num=1? → ",{"type":47,"tag":66,"props":949,"children":951},{"className":950},[],[952],{"type":53,"value":953},"schema-props-*",{"type":47,"tag":794,"props":955,"children":957},{"className":956},[797],[958,961,962,967,969],{"type":47,"tag":800,"props":959,"children":960},{"disabled":802,"type":803},[],{"type":53,"value":806},{"type":47,"tag":412,"props":963,"children":964},{},[965],{"type":53,"value":966},"DDL hard constraints",{"type":53,"value":968}," (Apache Doris rejects DDL if any violated):\n",{"type":47,"tag":788,"props":970,"children":971},{},[972,983,1004,1015,1044,1057,1076,1087,1124,1151,1170,1189,1207,1235,1246],{"type":47,"tag":794,"props":973,"children":974},{},[975,977],{"type":53,"value":976},"UNIQUE KEY + PARTITION BY RANGE → partition column MUST be in the UNIQUE KEY: ",{"type":47,"tag":66,"props":978,"children":980},{"className":979},[],[981],{"type":53,"value":982},"UNIQUE KEY(id, dt) PARTITION BY RANGE(dt)",{"type":47,"tag":794,"props":984,"children":985},{},[986,988,994,996,1002],{"type":53,"value":987},"Key columns must be the FIRST N columns in schema, same order — put key cols first, non-key after. Example: ",{"type":47,"tag":66,"props":989,"children":991},{"className":990},[],[992],{"type":53,"value":993},"UNIQUE KEY(account_id, symbol)",{"type":53,"value":995}," means schema must start with ",{"type":47,"tag":66,"props":997,"children":999},{"className":998},[],[1000],{"type":53,"value":1001},"account_id, symbol, ...",{"type":53,"value":1003}," — never place non-key columns between key columns",{"type":47,"tag":794,"props":1005,"children":1006},{},[1007,1013],{"type":47,"tag":66,"props":1008,"children":1010},{"className":1009},[],[1011],{"type":53,"value":1012},"store_row_column = \"true\"",{"type":53,"value":1014}," works on UNIQUE MoW and DUPLICATE — NOT on AGGREGATE (Doris rejects AGG: \"Aggregate table can't support row column\"). Verified on 4.x; older versions were UNIQUE-only",{"type":47,"tag":794,"props":1016,"children":1017},{},[1018,1020,1026,1028,1034,1036,1042],{"type":53,"value":1019},"AUTO PARTITION requires ",{"type":47,"tag":66,"props":1021,"children":1023},{"className":1022},[],[1024],{"type":53,"value":1025},"date_trunc()",{"type":53,"value":1027}," AND empty parens: ",{"type":47,"tag":66,"props":1029,"children":1031},{"className":1030},[],[1032],{"type":53,"value":1033},"AUTO PARTITION BY RANGE(date_trunc(col, 'day')) ()",{"type":53,"value":1035}," — bare column name fails, missing ",{"type":47,"tag":66,"props":1037,"children":1039},{"className":1038},[],[1040],{"type":53,"value":1041},"()",{"type":53,"value":1043}," fails",{"type":47,"tag":794,"props":1045,"children":1046},{},[1047,1049,1055],{"type":53,"value":1048},"Dynamic partition requires explicit ",{"type":47,"tag":66,"props":1050,"children":1052},{"className":1051},[],[1053],{"type":53,"value":1054},"PARTITION BY RANGE(col) ()",{"type":53,"value":1056}," clause in DDL — properties alone are not enough",{"type":47,"tag":794,"props":1058,"children":1059},{},[1060,1062,1068,1070],{"type":53,"value":1061},"Do not set ",{"type":47,"tag":66,"props":1063,"children":1065},{"className":1064},[],[1066],{"type":53,"value":1067},"dynamic_partition.buckets",{"type":53,"value":1069},"; put the numeric count only in ",{"type":47,"tag":66,"props":1071,"children":1073},{"className":1072},[],[1074],{"type":53,"value":1075},"DISTRIBUTED BY HASH(col) BUCKETS N",{"type":47,"tag":794,"props":1077,"children":1078},{},[1079,1085],{"type":47,"tag":66,"props":1080,"children":1082},{"className":1081},[],[1083],{"type":53,"value":1084},"compaction_policy = \"time_series\"",{"type":53,"value":1086}," only for DUPLICATE tables — fails on UNIQUE",{"type":47,"tag":794,"props":1088,"children":1089},{},[1090,1092,1098,1100,1106,1108,1114,1116,1122],{"type":53,"value":1091},"Async MV refresh: use ",{"type":47,"tag":66,"props":1093,"children":1095},{"className":1094},[],[1096],{"type":53,"value":1097},"REFRESH AUTO ON SCHEDULE EVERY 10 MINUTE",{"type":53,"value":1099}," or ",{"type":47,"tag":66,"props":1101,"children":1103},{"className":1102},[],[1104],{"type":53,"value":1105},"REFRESH COMPLETE ON SCHEDULE EVERY 10 MINUTE",{"type":53,"value":1107}," — NOT ",{"type":47,"tag":66,"props":1109,"children":1111},{"className":1110},[],[1112],{"type":53,"value":1113},"REFRESH SCHEDULE EVERY",{"type":53,"value":1115},", NOT ",{"type":47,"tag":66,"props":1117,"children":1119},{"className":1118},[],[1120],{"type":53,"value":1121},"REFRESH ASYNC EVERY(INTERVAL ...)",{"type":53,"value":1123},". Minimum interval: 1 MINUTE",{"type":47,"tag":794,"props":1125,"children":1126},{},[1127,1129,1135,1137,1143,1145],{"type":53,"value":1128},"MV using ",{"type":47,"tag":66,"props":1130,"children":1132},{"className":1131},[],[1133],{"type":53,"value":1134},"NOW()",{"type":53,"value":1136},"\u002F",{"type":47,"tag":66,"props":1138,"children":1140},{"className":1139},[],[1141],{"type":53,"value":1142},"CURDATE()",{"type":53,"value":1144},": add ",{"type":47,"tag":66,"props":1146,"children":1148},{"className":1147},[],[1149],{"type":53,"value":1150},"PROPERTIES (\"enable_nondeterministic_function\" = \"true\")",{"type":47,"tag":794,"props":1152,"children":1153},{},[1154,1156,1162,1164],{"type":53,"value":1155},"BOOLEAN defaults must be quoted: ",{"type":47,"tag":66,"props":1157,"children":1159},{"className":1158},[],[1160],{"type":53,"value":1161},"DEFAULT \"true\"",{"type":53,"value":1163}," not ",{"type":47,"tag":66,"props":1165,"children":1167},{"className":1166},[],[1168],{"type":53,"value":1169},"DEFAULT TRUE",{"type":47,"tag":794,"props":1171,"children":1172},{},[1173,1175,1181,1183],{"type":53,"value":1174},"BloomFilter index: use ",{"type":47,"tag":66,"props":1176,"children":1178},{"className":1177},[],[1179],{"type":53,"value":1180},"PROPERTIES (\"bloom_filter_columns\" = \"col1,col2\")",{"type":53,"value":1182}," — NOT inline ",{"type":47,"tag":66,"props":1184,"children":1186},{"className":1185},[],[1187],{"type":53,"value":1188},"INDEX ... USING BLOOM FILTER",{"type":47,"tag":794,"props":1190,"children":1191},{},[1192,1194,1200,1201],{"type":53,"value":1193},"AGGREGATE column syntax: aggregation function BEFORE default: ",{"type":47,"tag":66,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":53,"value":1199},"col BIGINT SUM DEFAULT \"0\"",{"type":53,"value":1107},{"type":47,"tag":66,"props":1202,"children":1204},{"className":1203},[],[1205],{"type":53,"value":1206},"col BIGINT DEFAULT \"0\" SUM",{"type":47,"tag":794,"props":1208,"children":1209},{},[1210,1212,1218,1220,1226,1228,1233],{"type":53,"value":1211},"AGGREGATE ",{"type":47,"tag":66,"props":1213,"children":1215},{"className":1214},[],[1216],{"type":53,"value":1217},"DEFAULT \"null\"",{"type":53,"value":1219}," only works for VARCHAR — fails on INT, DATE, DECIMAL, BIGINT. Omit DEFAULT entirely for REPLACE_IF_NOT_NULL on non-string types: ",{"type":47,"tag":66,"props":1221,"children":1223},{"className":1222},[],[1224],{"type":53,"value":1225},"vip_level INT REPLACE_IF_NOT_NULL",{"type":53,"value":1227}," (not ",{"type":47,"tag":66,"props":1229,"children":1231},{"className":1230},[],[1232],{"type":53,"value":1217},{"type":53,"value":1234},")",{"type":47,"tag":794,"props":1236,"children":1237},{},[1238,1244],{"type":47,"tag":66,"props":1239,"children":1241},{"className":1240},[],[1242],{"type":53,"value":1243},"enable_unique_key_partial_update",{"type":53,"value":1245}," is a session variable, NOT a table property",{"type":47,"tag":794,"props":1247,"children":1248},{},[1249,1251],{"type":53,"value":1250},"Full details: ",{"type":47,"tag":66,"props":1252,"children":1254},{"className":1253},[],[1255],{"type":53,"value":1256},"schema-ddl-gotchas",{"type":47,"tag":75,"props":1258,"children":1259},{},[],{"type":47,"tag":79,"props":1261,"children":1263},{"id":1262},"_2b-ddl-templates-copy-the-closest-match-customize-columns",[1264],{"type":53,"value":1265},"2b ▸ DDL Templates (copy the closest match, customize columns)",{"type":47,"tag":60,"props":1267,"children":1268},{},[1269],{"type":53,"value":1270},"For each CREATE TABLE, select the closest template below. Customize column names, types, bucket count, and partition settings. Do NOT write DDL from scratch.",{"type":47,"tag":86,"props":1272,"children":1274},{"id":1273},"t1-append-only-eventslogs-duplicate",[1275],{"type":53,"value":1276},"T1: Append-only events\u002Flogs (DUPLICATE)",{"type":47,"tag":1278,"props":1279,"children":1284},"pre",{"className":1280,"code":1281,"language":1282,"meta":1283,"style":1283},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","CREATE TABLE events (\n    entity_id    VARCHAR(64)  NOT NULL,\n    event_time   DATETIME     NOT NULL,\n    event_type   VARCHAR(50)  NOT NULL,\n    payload      VARIANT\n) DUPLICATE KEY(entity_id, event_time, event_type)\nPARTITION BY RANGE(event_time) ()\nDISTRIBUTED BY HASH(entity_id) BUCKETS 10\nPROPERTIES (\n    \"dynamic_partition.enable\" = \"true\",\n    \"dynamic_partition.time_unit\" = \"DAY\",\n    \"dynamic_partition.start\" = \"-90\",\n    \"dynamic_partition.end\" = \"3\",\n    \"dynamic_partition.prefix\" = \"p\",\n    \"compression\" = \"zstd\",\n    \"compaction_policy\" = \"time_series\",\n    \"replication_num\" = \"1\"\n);\n","sql","",[1285],{"type":47,"tag":66,"props":1286,"children":1287},{"__ignoreMap":1283},[1288,1299,1308,1317,1325,1334,1343,1352,1361,1370,1379,1388,1397,1406,1415,1424,1433,1442],{"type":47,"tag":1289,"props":1290,"children":1293},"span",{"class":1291,"line":1292},"line",1,[1294],{"type":47,"tag":1289,"props":1295,"children":1296},{},[1297],{"type":53,"value":1298},"CREATE TABLE events (\n",{"type":47,"tag":1289,"props":1300,"children":1302},{"class":1291,"line":1301},2,[1303],{"type":47,"tag":1289,"props":1304,"children":1305},{},[1306],{"type":53,"value":1307},"    entity_id    VARCHAR(64)  NOT NULL,\n",{"type":47,"tag":1289,"props":1309,"children":1311},{"class":1291,"line":1310},3,[1312],{"type":47,"tag":1289,"props":1313,"children":1314},{},[1315],{"type":53,"value":1316},"    event_time   DATETIME     NOT NULL,\n",{"type":47,"tag":1289,"props":1318,"children":1319},{"class":1291,"line":26},[1320],{"type":47,"tag":1289,"props":1321,"children":1322},{},[1323],{"type":53,"value":1324},"    event_type   VARCHAR(50)  NOT NULL,\n",{"type":47,"tag":1289,"props":1326,"children":1328},{"class":1291,"line":1327},5,[1329],{"type":47,"tag":1289,"props":1330,"children":1331},{},[1332],{"type":53,"value":1333},"    payload      VARIANT\n",{"type":47,"tag":1289,"props":1335,"children":1337},{"class":1291,"line":1336},6,[1338],{"type":47,"tag":1289,"props":1339,"children":1340},{},[1341],{"type":53,"value":1342},") DUPLICATE KEY(entity_id, event_time, event_type)\n",{"type":47,"tag":1289,"props":1344,"children":1346},{"class":1291,"line":1345},7,[1347],{"type":47,"tag":1289,"props":1348,"children":1349},{},[1350],{"type":53,"value":1351},"PARTITION BY RANGE(event_time) ()\n",{"type":47,"tag":1289,"props":1353,"children":1355},{"class":1291,"line":1354},8,[1356],{"type":47,"tag":1289,"props":1357,"children":1358},{},[1359],{"type":53,"value":1360},"DISTRIBUTED BY HASH(entity_id) BUCKETS 10\n",{"type":47,"tag":1289,"props":1362,"children":1364},{"class":1291,"line":1363},9,[1365],{"type":47,"tag":1289,"props":1366,"children":1367},{},[1368],{"type":53,"value":1369},"PROPERTIES (\n",{"type":47,"tag":1289,"props":1371,"children":1373},{"class":1291,"line":1372},10,[1374],{"type":47,"tag":1289,"props":1375,"children":1376},{},[1377],{"type":53,"value":1378},"    \"dynamic_partition.enable\" = \"true\",\n",{"type":47,"tag":1289,"props":1380,"children":1382},{"class":1291,"line":1381},11,[1383],{"type":47,"tag":1289,"props":1384,"children":1385},{},[1386],{"type":53,"value":1387},"    \"dynamic_partition.time_unit\" = \"DAY\",\n",{"type":47,"tag":1289,"props":1389,"children":1391},{"class":1291,"line":1390},12,[1392],{"type":47,"tag":1289,"props":1393,"children":1394},{},[1395],{"type":53,"value":1396},"    \"dynamic_partition.start\" = \"-90\",\n",{"type":47,"tag":1289,"props":1398,"children":1400},{"class":1291,"line":1399},13,[1401],{"type":47,"tag":1289,"props":1402,"children":1403},{},[1404],{"type":53,"value":1405},"    \"dynamic_partition.end\" = \"3\",\n",{"type":47,"tag":1289,"props":1407,"children":1409},{"class":1291,"line":1408},14,[1410],{"type":47,"tag":1289,"props":1411,"children":1412},{},[1413],{"type":53,"value":1414},"    \"dynamic_partition.prefix\" = \"p\",\n",{"type":47,"tag":1289,"props":1416,"children":1418},{"class":1291,"line":1417},15,[1419],{"type":47,"tag":1289,"props":1420,"children":1421},{},[1422],{"type":53,"value":1423},"    \"compression\" = \"zstd\",\n",{"type":47,"tag":1289,"props":1425,"children":1427},{"class":1291,"line":1426},16,[1428],{"type":47,"tag":1289,"props":1429,"children":1430},{},[1431],{"type":53,"value":1432},"    \"compaction_policy\" = \"time_series\",\n",{"type":47,"tag":1289,"props":1434,"children":1436},{"class":1291,"line":1435},17,[1437],{"type":47,"tag":1289,"props":1438,"children":1439},{},[1440],{"type":53,"value":1441},"    \"replication_num\" = \"1\"\n",{"type":47,"tag":1289,"props":1443,"children":1445},{"class":1291,"line":1444},18,[1446],{"type":47,"tag":1289,"props":1447,"children":1448},{},[1449],{"type":53,"value":1450},");\n",{"type":47,"tag":86,"props":1452,"children":1454},{"id":1453},"t2-updatable-with-partition-unique-mow-cdc",[1455],{"type":53,"value":1456},"T2: Updatable with partition (UNIQUE MoW + CDC)",{"type":47,"tag":1278,"props":1458,"children":1460},{"className":1280,"code":1459,"language":1282,"meta":1283,"style":1283},"CREATE TABLE orders (\n    order_id     BIGINT       NOT NULL,\n    order_time   DATETIME     NOT NULL,\n    update_time  DATETIME     NOT NULL,\n    status       VARCHAR(20),\n    amount       DECIMAL(18,2)\n) UNIQUE KEY(order_id, order_time)\nPARTITION BY RANGE(order_time) ()\nDISTRIBUTED BY HASH(order_id) BUCKETS 5\nPROPERTIES (\n    \"enable_unique_key_merge_on_write\" = \"true\",\n    \"function_column.sequence_col\" = \"update_time\",\n    \"dynamic_partition.enable\" = \"true\",\n    \"dynamic_partition.time_unit\" = \"DAY\",\n    \"dynamic_partition.start\" = \"-365\",\n    \"dynamic_partition.end\" = \"3\",\n    \"dynamic_partition.prefix\" = \"p\",\n    \"replication_num\" = \"1\"\n);\n",[1461],{"type":47,"tag":66,"props":1462,"children":1463},{"__ignoreMap":1283},[1464,1472,1480,1488,1496,1504,1512,1520,1528,1536,1543,1551,1559,1566,1573,1581,1588,1595,1602],{"type":47,"tag":1289,"props":1465,"children":1466},{"class":1291,"line":1292},[1467],{"type":47,"tag":1289,"props":1468,"children":1469},{},[1470],{"type":53,"value":1471},"CREATE TABLE orders (\n",{"type":47,"tag":1289,"props":1473,"children":1474},{"class":1291,"line":1301},[1475],{"type":47,"tag":1289,"props":1476,"children":1477},{},[1478],{"type":53,"value":1479},"    order_id     BIGINT       NOT NULL,\n",{"type":47,"tag":1289,"props":1481,"children":1482},{"class":1291,"line":1310},[1483],{"type":47,"tag":1289,"props":1484,"children":1485},{},[1486],{"type":53,"value":1487},"    order_time   DATETIME     NOT NULL,\n",{"type":47,"tag":1289,"props":1489,"children":1490},{"class":1291,"line":26},[1491],{"type":47,"tag":1289,"props":1492,"children":1493},{},[1494],{"type":53,"value":1495},"    update_time  DATETIME     NOT NULL,\n",{"type":47,"tag":1289,"props":1497,"children":1498},{"class":1291,"line":1327},[1499],{"type":47,"tag":1289,"props":1500,"children":1501},{},[1502],{"type":53,"value":1503},"    status       VARCHAR(20),\n",{"type":47,"tag":1289,"props":1505,"children":1506},{"class":1291,"line":1336},[1507],{"type":47,"tag":1289,"props":1508,"children":1509},{},[1510],{"type":53,"value":1511},"    amount       DECIMAL(18,2)\n",{"type":47,"tag":1289,"props":1513,"children":1514},{"class":1291,"line":1345},[1515],{"type":47,"tag":1289,"props":1516,"children":1517},{},[1518],{"type":53,"value":1519},") UNIQUE KEY(order_id, order_time)\n",{"type":47,"tag":1289,"props":1521,"children":1522},{"class":1291,"line":1354},[1523],{"type":47,"tag":1289,"props":1524,"children":1525},{},[1526],{"type":53,"value":1527},"PARTITION BY RANGE(order_time) ()\n",{"type":47,"tag":1289,"props":1529,"children":1530},{"class":1291,"line":1363},[1531],{"type":47,"tag":1289,"props":1532,"children":1533},{},[1534],{"type":53,"value":1535},"DISTRIBUTED BY HASH(order_id) BUCKETS 5\n",{"type":47,"tag":1289,"props":1537,"children":1538},{"class":1291,"line":1372},[1539],{"type":47,"tag":1289,"props":1540,"children":1541},{},[1542],{"type":53,"value":1369},{"type":47,"tag":1289,"props":1544,"children":1545},{"class":1291,"line":1381},[1546],{"type":47,"tag":1289,"props":1547,"children":1548},{},[1549],{"type":53,"value":1550},"    \"enable_unique_key_merge_on_write\" = \"true\",\n",{"type":47,"tag":1289,"props":1552,"children":1553},{"class":1291,"line":1390},[1554],{"type":47,"tag":1289,"props":1555,"children":1556},{},[1557],{"type":53,"value":1558},"    \"function_column.sequence_col\" = \"update_time\",\n",{"type":47,"tag":1289,"props":1560,"children":1561},{"class":1291,"line":1399},[1562],{"type":47,"tag":1289,"props":1563,"children":1564},{},[1565],{"type":53,"value":1378},{"type":47,"tag":1289,"props":1567,"children":1568},{"class":1291,"line":1408},[1569],{"type":47,"tag":1289,"props":1570,"children":1571},{},[1572],{"type":53,"value":1387},{"type":47,"tag":1289,"props":1574,"children":1575},{"class":1291,"line":1417},[1576],{"type":47,"tag":1289,"props":1577,"children":1578},{},[1579],{"type":53,"value":1580},"    \"dynamic_partition.start\" = \"-365\",\n",{"type":47,"tag":1289,"props":1582,"children":1583},{"class":1291,"line":1426},[1584],{"type":47,"tag":1289,"props":1585,"children":1586},{},[1587],{"type":53,"value":1405},{"type":47,"tag":1289,"props":1589,"children":1590},{"class":1291,"line":1435},[1591],{"type":47,"tag":1289,"props":1592,"children":1593},{},[1594],{"type":53,"value":1414},{"type":47,"tag":1289,"props":1596,"children":1597},{"class":1291,"line":1444},[1598],{"type":47,"tag":1289,"props":1599,"children":1600},{},[1601],{"type":53,"value":1441},{"type":47,"tag":1289,"props":1603,"children":1604},{"class":1291,"line":22},[1605],{"type":47,"tag":1289,"props":1606,"children":1607},{},[1608],{"type":53,"value":1450},{"type":47,"tag":86,"props":1610,"children":1612},{"id":1611},"t3-small-dimension-lookup-unique-no-partition",[1613],{"type":53,"value":1614},"T3: Small dimension \u002F lookup (UNIQUE, no partition)",{"type":47,"tag":1278,"props":1616,"children":1618},{"className":1280,"code":1617,"language":1282,"meta":1283,"style":1283},"CREATE TABLE dim_product (\n    product_id   INT          NOT NULL,\n    name         VARCHAR(200),\n    category     VARCHAR(50)\n) UNIQUE KEY(product_id)\nDISTRIBUTED BY HASH(product_id) BUCKETS 3\nPROPERTIES (\n    \"enable_unique_key_merge_on_write\" = \"true\",\n    \"replication_num\" = \"1\"\n);\n",[1619],{"type":47,"tag":66,"props":1620,"children":1621},{"__ignoreMap":1283},[1622,1630,1638,1646,1654,1662,1670,1677,1684,1691],{"type":47,"tag":1289,"props":1623,"children":1624},{"class":1291,"line":1292},[1625],{"type":47,"tag":1289,"props":1626,"children":1627},{},[1628],{"type":53,"value":1629},"CREATE TABLE dim_product (\n",{"type":47,"tag":1289,"props":1631,"children":1632},{"class":1291,"line":1301},[1633],{"type":47,"tag":1289,"props":1634,"children":1635},{},[1636],{"type":53,"value":1637},"    product_id   INT          NOT NULL,\n",{"type":47,"tag":1289,"props":1639,"children":1640},{"class":1291,"line":1310},[1641],{"type":47,"tag":1289,"props":1642,"children":1643},{},[1644],{"type":53,"value":1645},"    name         VARCHAR(200),\n",{"type":47,"tag":1289,"props":1647,"children":1648},{"class":1291,"line":26},[1649],{"type":47,"tag":1289,"props":1650,"children":1651},{},[1652],{"type":53,"value":1653},"    category     VARCHAR(50)\n",{"type":47,"tag":1289,"props":1655,"children":1656},{"class":1291,"line":1327},[1657],{"type":47,"tag":1289,"props":1658,"children":1659},{},[1660],{"type":53,"value":1661},") UNIQUE KEY(product_id)\n",{"type":47,"tag":1289,"props":1663,"children":1664},{"class":1291,"line":1336},[1665],{"type":47,"tag":1289,"props":1666,"children":1667},{},[1668],{"type":53,"value":1669},"DISTRIBUTED BY HASH(product_id) BUCKETS 3\n",{"type":47,"tag":1289,"props":1671,"children":1672},{"class":1291,"line":1345},[1673],{"type":47,"tag":1289,"props":1674,"children":1675},{},[1676],{"type":53,"value":1369},{"type":47,"tag":1289,"props":1678,"children":1679},{"class":1291,"line":1354},[1680],{"type":47,"tag":1289,"props":1681,"children":1682},{},[1683],{"type":53,"value":1550},{"type":47,"tag":1289,"props":1685,"children":1686},{"class":1291,"line":1363},[1687],{"type":47,"tag":1289,"props":1688,"children":1689},{},[1690],{"type":53,"value":1441},{"type":47,"tag":1289,"props":1692,"children":1693},{"class":1291,"line":1372},[1694],{"type":47,"tag":1289,"props":1695,"children":1696},{},[1697],{"type":53,"value":1450},{"type":47,"tag":86,"props":1699,"children":1701},{"id":1700},"t4-pre-aggregated-kpis-aggregate",[1702],{"type":53,"value":1703},"T4: Pre-aggregated KPIs (AGGREGATE)",{"type":47,"tag":1278,"props":1705,"children":1707},{"className":1280,"code":1706,"language":1282,"meta":1283,"style":1283},"CREATE TABLE daily_kpi (\n    stat_date    DATE         NOT NULL,\n    dimension    VARCHAR(50)  NOT NULL,\n    metric_sum   BIGINT       SUM DEFAULT \"0\",\n    metric_max   DOUBLE       MAX DEFAULT \"0\",\n    unique_users BITMAP       BITMAP_UNION\n) AGGREGATE KEY(stat_date, dimension)\nPARTITION BY RANGE(stat_date) ()\nDISTRIBUTED BY HASH(dimension) BUCKETS 3\nPROPERTIES (\n    \"dynamic_partition.enable\" = \"true\",\n    \"dynamic_partition.time_unit\" = \"MONTH\",\n    \"dynamic_partition.start\" = \"-12\",\n    \"dynamic_partition.end\" = \"1\",\n    \"dynamic_partition.prefix\" = \"p\",\n    \"replication_num\" = \"1\"\n);\n",[1708],{"type":47,"tag":66,"props":1709,"children":1710},{"__ignoreMap":1283},[1711,1719,1727,1735,1743,1751,1759,1767,1775,1783,1790,1797,1805,1813,1821,1828,1835],{"type":47,"tag":1289,"props":1712,"children":1713},{"class":1291,"line":1292},[1714],{"type":47,"tag":1289,"props":1715,"children":1716},{},[1717],{"type":53,"value":1718},"CREATE TABLE daily_kpi (\n",{"type":47,"tag":1289,"props":1720,"children":1721},{"class":1291,"line":1301},[1722],{"type":47,"tag":1289,"props":1723,"children":1724},{},[1725],{"type":53,"value":1726},"    stat_date    DATE         NOT NULL,\n",{"type":47,"tag":1289,"props":1728,"children":1729},{"class":1291,"line":1310},[1730],{"type":47,"tag":1289,"props":1731,"children":1732},{},[1733],{"type":53,"value":1734},"    dimension    VARCHAR(50)  NOT NULL,\n",{"type":47,"tag":1289,"props":1736,"children":1737},{"class":1291,"line":26},[1738],{"type":47,"tag":1289,"props":1739,"children":1740},{},[1741],{"type":53,"value":1742},"    metric_sum   BIGINT       SUM DEFAULT \"0\",\n",{"type":47,"tag":1289,"props":1744,"children":1745},{"class":1291,"line":1327},[1746],{"type":47,"tag":1289,"props":1747,"children":1748},{},[1749],{"type":53,"value":1750},"    metric_max   DOUBLE       MAX DEFAULT \"0\",\n",{"type":47,"tag":1289,"props":1752,"children":1753},{"class":1291,"line":1336},[1754],{"type":47,"tag":1289,"props":1755,"children":1756},{},[1757],{"type":53,"value":1758},"    unique_users BITMAP       BITMAP_UNION\n",{"type":47,"tag":1289,"props":1760,"children":1761},{"class":1291,"line":1345},[1762],{"type":47,"tag":1289,"props":1763,"children":1764},{},[1765],{"type":53,"value":1766},") AGGREGATE KEY(stat_date, dimension)\n",{"type":47,"tag":1289,"props":1768,"children":1769},{"class":1291,"line":1354},[1770],{"type":47,"tag":1289,"props":1771,"children":1772},{},[1773],{"type":53,"value":1774},"PARTITION BY RANGE(stat_date) ()\n",{"type":47,"tag":1289,"props":1776,"children":1777},{"class":1291,"line":1363},[1778],{"type":47,"tag":1289,"props":1779,"children":1780},{},[1781],{"type":53,"value":1782},"DISTRIBUTED BY HASH(dimension) BUCKETS 3\n",{"type":47,"tag":1289,"props":1784,"children":1785},{"class":1291,"line":1372},[1786],{"type":47,"tag":1289,"props":1787,"children":1788},{},[1789],{"type":53,"value":1369},{"type":47,"tag":1289,"props":1791,"children":1792},{"class":1291,"line":1381},[1793],{"type":47,"tag":1289,"props":1794,"children":1795},{},[1796],{"type":53,"value":1378},{"type":47,"tag":1289,"props":1798,"children":1799},{"class":1291,"line":1390},[1800],{"type":47,"tag":1289,"props":1801,"children":1802},{},[1803],{"type":53,"value":1804},"    \"dynamic_partition.time_unit\" = \"MONTH\",\n",{"type":47,"tag":1289,"props":1806,"children":1807},{"class":1291,"line":1399},[1808],{"type":47,"tag":1289,"props":1809,"children":1810},{},[1811],{"type":53,"value":1812},"    \"dynamic_partition.start\" = \"-12\",\n",{"type":47,"tag":1289,"props":1814,"children":1815},{"class":1291,"line":1408},[1816],{"type":47,"tag":1289,"props":1817,"children":1818},{},[1819],{"type":53,"value":1820},"    \"dynamic_partition.end\" = \"1\",\n",{"type":47,"tag":1289,"props":1822,"children":1823},{"class":1291,"line":1417},[1824],{"type":47,"tag":1289,"props":1825,"children":1826},{},[1827],{"type":53,"value":1414},{"type":47,"tag":1289,"props":1829,"children":1830},{"class":1291,"line":1426},[1831],{"type":47,"tag":1289,"props":1832,"children":1833},{},[1834],{"type":53,"value":1441},{"type":47,"tag":1289,"props":1836,"children":1837},{"class":1291,"line":1435},[1838],{"type":47,"tag":1289,"props":1839,"children":1840},{},[1841],{"type":53,"value":1450},{"type":47,"tag":86,"props":1843,"children":1845},{"id":1844},"t5-point-query-api-serving-unique-mow-row-store",[1846],{"type":53,"value":1847},"T5: Point query \u002F API serving (UNIQUE MoW + row store)",{"type":47,"tag":1278,"props":1849,"children":1851},{"className":1280,"code":1850,"language":1282,"meta":1283,"style":1283},"CREATE TABLE user_profiles (\n    user_id      BIGINT       NOT NULL,\n    update_time  DATETIME     NOT NULL,\n    name         VARCHAR(100),\n    data         VARIANT\n) UNIQUE KEY(user_id)\nDISTRIBUTED BY HASH(user_id) BUCKETS 5\nPROPERTIES (\n    \"enable_unique_key_merge_on_write\" = \"true\",\n    \"function_column.sequence_col\" = \"update_time\",\n    \"store_row_column\" = \"true\",\n    \"light_schema_change\" = \"true\",\n    \"replication_num\" = \"1\"\n);\n",[1852],{"type":47,"tag":66,"props":1853,"children":1854},{"__ignoreMap":1283},[1855,1863,1871,1878,1886,1894,1902,1910,1917,1924,1931,1939,1947,1954],{"type":47,"tag":1289,"props":1856,"children":1857},{"class":1291,"line":1292},[1858],{"type":47,"tag":1289,"props":1859,"children":1860},{},[1861],{"type":53,"value":1862},"CREATE TABLE user_profiles (\n",{"type":47,"tag":1289,"props":1864,"children":1865},{"class":1291,"line":1301},[1866],{"type":47,"tag":1289,"props":1867,"children":1868},{},[1869],{"type":53,"value":1870},"    user_id      BIGINT       NOT NULL,\n",{"type":47,"tag":1289,"props":1872,"children":1873},{"class":1291,"line":1310},[1874],{"type":47,"tag":1289,"props":1875,"children":1876},{},[1877],{"type":53,"value":1495},{"type":47,"tag":1289,"props":1879,"children":1880},{"class":1291,"line":26},[1881],{"type":47,"tag":1289,"props":1882,"children":1883},{},[1884],{"type":53,"value":1885},"    name         VARCHAR(100),\n",{"type":47,"tag":1289,"props":1887,"children":1888},{"class":1291,"line":1327},[1889],{"type":47,"tag":1289,"props":1890,"children":1891},{},[1892],{"type":53,"value":1893},"    data         VARIANT\n",{"type":47,"tag":1289,"props":1895,"children":1896},{"class":1291,"line":1336},[1897],{"type":47,"tag":1289,"props":1898,"children":1899},{},[1900],{"type":53,"value":1901},") UNIQUE KEY(user_id)\n",{"type":47,"tag":1289,"props":1903,"children":1904},{"class":1291,"line":1345},[1905],{"type":47,"tag":1289,"props":1906,"children":1907},{},[1908],{"type":53,"value":1909},"DISTRIBUTED BY HASH(user_id) BUCKETS 5\n",{"type":47,"tag":1289,"props":1911,"children":1912},{"class":1291,"line":1354},[1913],{"type":47,"tag":1289,"props":1914,"children":1915},{},[1916],{"type":53,"value":1369},{"type":47,"tag":1289,"props":1918,"children":1919},{"class":1291,"line":1363},[1920],{"type":47,"tag":1289,"props":1921,"children":1922},{},[1923],{"type":53,"value":1550},{"type":47,"tag":1289,"props":1925,"children":1926},{"class":1291,"line":1372},[1927],{"type":47,"tag":1289,"props":1928,"children":1929},{},[1930],{"type":53,"value":1558},{"type":47,"tag":1289,"props":1932,"children":1933},{"class":1291,"line":1381},[1934],{"type":47,"tag":1289,"props":1935,"children":1936},{},[1937],{"type":53,"value":1938},"    \"store_row_column\" = \"true\",\n",{"type":47,"tag":1289,"props":1940,"children":1941},{"class":1291,"line":1390},[1942],{"type":47,"tag":1289,"props":1943,"children":1944},{},[1945],{"type":53,"value":1946},"    \"light_schema_change\" = \"true\",\n",{"type":47,"tag":1289,"props":1948,"children":1949},{"class":1291,"line":1399},[1950],{"type":47,"tag":1289,"props":1951,"children":1952},{},[1953],{"type":53,"value":1441},{"type":47,"tag":1289,"props":1955,"children":1956},{"class":1291,"line":1408},[1957],{"type":47,"tag":1289,"props":1958,"children":1959},{},[1960],{"type":53,"value":1450},{"type":47,"tag":75,"props":1962,"children":1963},{},[],{"type":47,"tag":79,"props":1965,"children":1967},{"id":1966},"_3-connection-cli",[1968],{"type":53,"value":1969},"3 ▸ Connection & CLI",{"type":47,"tag":60,"props":1971,"children":1972},{},[1973,1975,1980,1982,1988,1990,1995,1997,2003],{"type":53,"value":1974},"Apache Doris speaks the MySQL protocol, so the ",{"type":47,"tag":412,"props":1976,"children":1977},{},[1978],{"type":53,"value":1979},"always-available",{"type":53,"value":1981}," path is any MySQL-compatible client (",{"type":47,"tag":66,"props":1983,"children":1985},{"className":1984},[],[1986],{"type":53,"value":1987},"mysql",{"type":53,"value":1989},") plus SQL and the FE HTTP REST API. Some distributions also ship an ",{"type":47,"tag":412,"props":1991,"children":1992},{},[1993],{"type":53,"value":1994},"optional management CLI",{"type":53,"value":1996}," (referred to here as ",{"type":47,"tag":66,"props":1998,"children":2000},{"className":1999},[],[2001],{"type":53,"value":2002},"doriscli",{"type":53,"value":2004},") that adds ergonomic profiling and diagnostics commands — use it when your distribution provides one, otherwise use the native path.",{"type":47,"tag":86,"props":2006,"children":2008},{"id":2007},"detect-the-optional-cli",[2009],{"type":53,"value":2010},"Detect the optional CLI",{"type":47,"tag":60,"props":2012,"children":2013},{},[2014],{"type":53,"value":2015},"Before running any queries, detect whether the CLI binary is available:",{"type":47,"tag":2017,"props":2018,"children":2019},"ol",{},[2020,2033,2044],{"type":47,"tag":794,"props":2021,"children":2022},{},[2023,2025,2031],{"type":53,"value":2024},"Check ",{"type":47,"tag":66,"props":2026,"children":2028},{"className":2027},[],[2029],{"type":53,"value":2030},"DORIS_CLI_PATH",{"type":53,"value":2032}," env var — if set, use that binary path",{"type":47,"tag":794,"props":2034,"children":2035},{},[2036,2042],{"type":47,"tag":66,"props":2037,"children":2039},{"className":2038},[],[2040],{"type":53,"value":2041},"command -v doriscli",{"type":53,"value":2043}," — use from PATH",{"type":47,"tag":794,"props":2045,"children":2046},{},[2047,2049,2054,2056,2062],{"type":53,"value":2048},"If none available: fall back to ",{"type":47,"tag":66,"props":2050,"children":2052},{"className":2051},[],[2053],{"type":53,"value":1987},{"type":53,"value":2055}," client (see ",{"type":47,"tag":66,"props":2057,"children":2059},{"className":2058},[],[2060],{"type":53,"value":2061},"references\u002Fstart-*.md",{"type":53,"value":1234},{"type":47,"tag":86,"props":2064,"children":2066},{"id":2065},"when-doriscli-is-available-prefer-it-for-all-operations",[2067],{"type":53,"value":2068},"When doriscli is available, prefer it for all operations:",{"type":47,"tag":93,"props":2070,"children":2071},{},[2072,2088],{"type":47,"tag":97,"props":2073,"children":2074},{},[2075],{"type":47,"tag":101,"props":2076,"children":2077},{},[2078,2083],{"type":47,"tag":105,"props":2079,"children":2080},{},[2081],{"type":53,"value":2082},"Task",{"type":47,"tag":105,"props":2084,"children":2085},{},[2086],{"type":53,"value":2087},"doriscli Command",{"type":47,"tag":121,"props":2089,"children":2090},{},[2091,2108,2125,2150,2169,2195,2212,2229,2246],{"type":47,"tag":101,"props":2092,"children":2093},{},[2094,2099],{"type":47,"tag":128,"props":2095,"children":2096},{},[2097],{"type":53,"value":2098},"Run SQL",{"type":47,"tag":128,"props":2100,"children":2101},{},[2102],{"type":47,"tag":66,"props":2103,"children":2105},{"className":2104},[],[2106],{"type":53,"value":2107},"doriscli sql \"SELECT ...\"",{"type":47,"tag":101,"props":2109,"children":2110},{},[2111,2116],{"type":47,"tag":128,"props":2112,"children":2113},{},[2114],{"type":53,"value":2115},"DDL inspection",{"type":47,"tag":128,"props":2117,"children":2118},{},[2119],{"type":47,"tag":66,"props":2120,"children":2122},{"className":2121},[],[2123],{"type":53,"value":2124},"doriscli sql \"SHOW CREATE TABLE db.t\"",{"type":47,"tag":101,"props":2126,"children":2127},{},[2128,2133],{"type":47,"tag":128,"props":2129,"children":2130},{},[2131],{"type":53,"value":2132},"Table\u002Ftablet health",{"type":47,"tag":128,"props":2134,"children":2135},{},[2136,2142,2144],{"type":47,"tag":66,"props":2137,"children":2139},{"className":2138},[],[2140],{"type":53,"value":2141},"doriscli tablet db.t",{"type":53,"value":2143}," (overview) or ",{"type":47,"tag":66,"props":2145,"children":2147},{"className":2146},[],[2148],{"type":53,"value":2149},"doriscli tablet db.t --detail",{"type":47,"tag":101,"props":2151,"children":2152},{},[2153,2158],{"type":47,"tag":128,"props":2154,"children":2155},{},[2156],{"type":53,"value":2157},"Profile a slow query",{"type":47,"tag":128,"props":2159,"children":2160},{},[2161,2167],{"type":47,"tag":66,"props":2162,"children":2164},{"className":2163},[],[2165],{"type":53,"value":2166},"doriscli sql \"SELECT ...\" --profile",{"type":53,"value":2168}," → captures query_id",{"type":47,"tag":101,"props":2170,"children":2171},{},[2172,2177],{"type":47,"tag":128,"props":2173,"children":2174},{},[2175],{"type":53,"value":2176},"Get query profile",{"type":47,"tag":128,"props":2178,"children":2179},{},[2180,2186,2187,2193],{"type":47,"tag":66,"props":2181,"children":2183},{"className":2182},[],[2184],{"type":53,"value":2185},"doriscli profile get \u003Cqid>",{"type":53,"value":1099},{"type":47,"tag":66,"props":2188,"children":2190},{"className":2189},[],[2191],{"type":53,"value":2192},"--full",{"type":53,"value":2194}," for complete diagnosis",{"type":47,"tag":101,"props":2196,"children":2197},{},[2198,2203],{"type":47,"tag":128,"props":2199,"children":2200},{},[2201],{"type":53,"value":2202},"Compare fast vs slow",{"type":47,"tag":128,"props":2204,"children":2205},{},[2206],{"type":47,"tag":66,"props":2207,"children":2209},{"className":2208},[],[2210],{"type":53,"value":2211},"doriscli profile diff \u003Cslow_qid> \u003Cfast_qid>",{"type":47,"tag":101,"props":2213,"children":2214},{},[2215,2220],{"type":47,"tag":128,"props":2216,"children":2217},{},[2218],{"type":53,"value":2219},"Performance trend",{"type":47,"tag":128,"props":2221,"children":2222},{},[2223],{"type":47,"tag":66,"props":2224,"children":2226},{"className":2225},[],[2227],{"type":53,"value":2228},"doriscli profile history \u003Csql_pattern> --days 7",{"type":47,"tag":101,"props":2230,"children":2231},{},[2232,2237],{"type":47,"tag":128,"props":2233,"children":2234},{},[2235],{"type":53,"value":2236},"Test connection",{"type":47,"tag":128,"props":2238,"children":2239},{},[2240],{"type":47,"tag":66,"props":2241,"children":2243},{"className":2242},[],[2244],{"type":53,"value":2245},"doriscli auth status",{"type":47,"tag":101,"props":2247,"children":2248},{},[2249,2254],{"type":47,"tag":128,"props":2250,"children":2251},{},[2252],{"type":53,"value":2253},"Switch environment",{"type":47,"tag":128,"props":2255,"children":2256},{},[2257],{"type":47,"tag":66,"props":2258,"children":2260},{"className":2259},[],[2261],{"type":53,"value":2262},"doriscli use \u003Cname>",{"type":47,"tag":86,"props":2264,"children":2266},{"id":2265},"runtime-query-investigation",[2267],{"type":53,"value":2268},"Runtime Query Investigation",{"type":47,"tag":60,"props":2270,"children":2271},{},[2272,2274,2279],{"type":53,"value":2273},"For slow queries or runtime performance issues, read ",{"type":47,"tag":66,"props":2275,"children":2277},{"className":2276},[],[2278],{"type":53,"value":424},{"type":53,"value":2280},".",{"type":47,"tag":788,"props":2282,"children":2283},{},[2284,2294,2324,2355,2381,2391,2396],{"type":47,"tag":794,"props":2285,"children":2286},{},[2287,2292],{"type":47,"tag":412,"props":2288,"children":2289},{},[2290],{"type":53,"value":2291},"Evidence first is mandatory",{"type":53,"value":2293},": collect or attempt profile, tablet, DDL, stats, EXPLAIN, history, active-query, or connection evidence before forming hypotheses. If evidence cannot be collected locally, state that and provide the exact commands to run",{"type":47,"tag":794,"props":2295,"children":2296},{},[2297,2302,2304,2310,2311,2316,2317,2322],{"type":47,"tag":412,"props":2298,"children":2299},{},[2300],{"type":53,"value":2301},"Prefer existing profiles",{"type":53,"value":2303},": use ",{"type":47,"tag":66,"props":2305,"children":2307},{"className":2306},[],[2308],{"type":53,"value":2309},"profile get \u003Cquery_id>",{"type":53,"value":434},{"type":47,"tag":66,"props":2312,"children":2314},{"className":2313},[],[2315],{"type":53,"value":440},{"type":53,"value":463},{"type":47,"tag":66,"props":2318,"children":2320},{"className":2319},[],[2321],{"type":53,"value":447},{"type":53,"value":2323}," before re-executing SQL",{"type":47,"tag":794,"props":2325,"children":2326},{},[2327,2332,2334,2339,2340,2346,2348,2353],{"type":47,"tag":412,"props":2328,"children":2329},{},[2330],{"type":53,"value":2331},"Proactive discovery",{"type":53,"value":2333},": for vague slow-query reports, start with ",{"type":47,"tag":66,"props":2335,"children":2337},{"className":2336},[],[2338],{"type":53,"value":469},{"type":53,"value":434},{"type":47,"tag":66,"props":2341,"children":2343},{"className":2342},[],[2344],{"type":53,"value":2345},"profile list --active",{"type":53,"value":2347},", and recent ",{"type":47,"tag":66,"props":2349,"children":2351},{"className":2350},[],[2352],{"type":53,"value":440},{"type":53,"value":2354}," before asking the user for more context",{"type":47,"tag":794,"props":2356,"children":2357},{},[2358,2363,2365,2371,2373,2379],{"type":47,"tag":412,"props":2359,"children":2360},{},[2361],{"type":53,"value":2362},"Safety gate",{"type":53,"value":2364},": before running user SQL with ",{"type":47,"tag":66,"props":2366,"children":2368},{"className":2367},[],[2369],{"type":53,"value":2370},"--profile",{"type":53,"value":2372},", check whether it is safe (no DDL, no mutation, no unbounded scan). For unknown, peak-hour, or expensive SQL, run ",{"type":47,"tag":66,"props":2374,"children":2376},{"className":2375},[],[2377],{"type":53,"value":2378},"doriscli sql \"EXPLAIN \u003Cquery>\" --format json",{"type":53,"value":2380}," first and ask confirmation or request an existing query_id",{"type":47,"tag":794,"props":2382,"children":2383},{},[2384,2389],{"type":47,"tag":412,"props":2385,"children":2386},{},[2387],{"type":53,"value":2388},"Hypotheses, not verdicts",{"type":53,"value":2390},": diagnostic mappings are heuristics. Present evidence, likely cause, what to check next, and when the conclusion may be wrong",{"type":47,"tag":794,"props":2392,"children":2393},{},[2394],{"type":53,"value":2395},"If doriscli is unavailable, fall back to SQL commands listed in the reference",{"type":47,"tag":794,"props":2397,"children":2398},{},[2399,2401,2407],{"type":53,"value":2400},"Always use ",{"type":47,"tag":66,"props":2402,"children":2404},{"className":2403},[],[2405],{"type":53,"value":2406},"--format json",{"type":53,"value":2408}," for structured agent-readable output",{"type":47,"tag":86,"props":2410,"children":2412},{"id":2411},"quick-start-guides",[2413],{"type":53,"value":2414},"Quick-start guides",{"type":47,"tag":788,"props":2416,"children":2417},{},[2418,2429],{"type":47,"tag":794,"props":2419,"children":2420},{},[2421,2427],{"type":47,"tag":66,"props":2422,"children":2424},{"className":2423},[],[2425],{"type":53,"value":2426},"references\u002Fstart-self-hosted.md",{"type":53,"value":2428}," — Self-hosted \u002F BYOC \u002F on-prem",{"type":47,"tag":794,"props":2430,"children":2431},{},[2432],{"type":53,"value":2433},"Cloud mode (storage-compute) connection differs only in the HTTP port (8080 vs 8030) — same guide applies",{"type":47,"tag":75,"props":2435,"children":2436},{},[],{"type":47,"tag":79,"props":2438,"children":2440},{"id":2439},"_4-cluster-sizing",[2441],{"type":53,"value":2442},"4 ▸ Cluster Sizing",{"type":47,"tag":60,"props":2444,"children":2445},{},[2446],{"type":53,"value":2447},"Sizing guides are in:",{"type":47,"tag":788,"props":2449,"children":2450},{},[2451,2462,2473,2484],{"type":47,"tag":794,"props":2452,"children":2453},{},[2454,2460],{"type":47,"tag":66,"props":2455,"children":2457},{"className":2456},[],[2458],{"type":53,"value":2459},"references\u002Fsizing-fe.md",{"type":53,"value":2461}," — FE node sizing",{"type":47,"tag":794,"props":2463,"children":2464},{},[2465,2471],{"type":47,"tag":66,"props":2466,"children":2468},{"className":2467},[],[2469],{"type":53,"value":2470},"references\u002Fsizing-be-integrated.md",{"type":53,"value":2472}," — BE sizing (integrated storage)",{"type":47,"tag":794,"props":2474,"children":2475},{},[2476,2482],{"type":47,"tag":66,"props":2477,"children":2479},{"className":2478},[],[2480],{"type":53,"value":2481},"references\u002Fsizing-be-cloud.md",{"type":53,"value":2483}," — BE sizing (cloud \u002F storage-compute)",{"type":47,"tag":794,"props":2485,"children":2486},{},[2487,2493],{"type":47,"tag":66,"props":2488,"children":2490},{"className":2489},[],[2491],{"type":53,"value":2492},"references\u002Fsizing-storage-formula.md",{"type":53,"value":2494}," — Storage calculation formula",{"type":47,"tag":75,"props":2496,"children":2497},{},[],{"type":47,"tag":79,"props":2499,"children":2501},{"id":2500},"_5-rule-index-by-category",[2502],{"type":53,"value":2503},"5 ▸ Rule Index by Category",{"type":47,"tag":86,"props":2505,"children":2507},{"id":2506},"data-model-critical-4-rules",[2508],{"type":53,"value":2509},"Data Model — CRITICAL (4 rules)",{"type":47,"tag":788,"props":2511,"children":2512},{},[2513,2523,2533,2544],{"type":47,"tag":794,"props":2514,"children":2515},{},[2516,2521],{"type":47,"tag":66,"props":2517,"children":2519},{"className":2518},[],[2520],{"type":53,"value":819},{"type":53,"value":2522}," — DUP vs UNIQUE vs AGG decision tree",{"type":47,"tag":794,"props":2524,"children":2525},{},[2526,2531],{"type":47,"tag":66,"props":2527,"children":2529},{"className":2528},[],[2530],{"type":53,"value":767},{"type":53,"value":2532}," — Always MoW for UNIQUE tables",{"type":47,"tag":794,"props":2534,"children":2535},{},[2536,2542],{"type":47,"tag":66,"props":2537,"children":2539},{"className":2538},[],[2540],{"type":53,"value":2541},"schema-model-avoid-agg-for-updates",{"type":53,"value":2543}," — AGG cannot UPDATE\u002FDELETE",{"type":47,"tag":794,"props":2545,"children":2546},{},[2547,2553],{"type":47,"tag":66,"props":2548,"children":2550},{"className":2549},[],[2551],{"type":53,"value":2552},"schema-model-sequence-col-for-cdc",{"type":53,"value":2554}," — Sequence column for out-of-order CDC",{"type":47,"tag":86,"props":2556,"children":2558},{"id":2557},"partition-strategy-critical-4-rules",[2559],{"type":53,"value":2560},"Partition Strategy — CRITICAL (4 rules)",{"type":47,"tag":788,"props":2562,"children":2563},{},[2564,2575,2586,2596],{"type":47,"tag":794,"props":2565,"children":2566},{},[2567,2573],{"type":47,"tag":66,"props":2568,"children":2570},{"className":2569},[],[2571],{"type":53,"value":2572},"schema-partition-range-for-timeseries",{"type":53,"value":2574}," — RANGE for time-series",{"type":47,"tag":794,"props":2576,"children":2577},{},[2578,2584],{"type":47,"tag":66,"props":2579,"children":2581},{"className":2580},[],[2582],{"type":53,"value":2583},"schema-partition-dynamic-ttl",{"type":53,"value":2585}," — Dynamic partition for automated TTL",{"type":47,"tag":794,"props":2587,"children":2588},{},[2589,2594],{"type":47,"tag":66,"props":2590,"children":2592},{"className":2591},[],[2593],{"type":53,"value":622},{"type":53,"value":2595}," — AUTO for sporadic data",{"type":47,"tag":794,"props":2597,"children":2598},{},[2599,2605],{"type":47,"tag":66,"props":2600,"children":2602},{"className":2601},[],[2603],{"type":53,"value":2604},"schema-partition-skip-for-small",{"type":53,"value":2606}," — Skip partitioning under 1 GB",{"type":47,"tag":86,"props":2608,"children":2610},{"id":2609},"bucket-strategy-critical-5-rules",[2611],{"type":53,"value":2612},"Bucket Strategy — CRITICAL (5 rules)",{"type":47,"tag":788,"props":2614,"children":2615},{},[2616,2627,2638,2648,2659],{"type":47,"tag":794,"props":2617,"children":2618},{},[2619,2625],{"type":47,"tag":66,"props":2620,"children":2622},{"className":2621},[],[2623],{"type":53,"value":2624},"schema-bucket-hash-vs-random",{"type":53,"value":2626}," — HASH for pruning, RANDOM for DUP only",{"type":47,"tag":794,"props":2628,"children":2629},{},[2630,2636],{"type":47,"tag":66,"props":2631,"children":2633},{"className":2632},[],[2634],{"type":53,"value":2635},"schema-bucket-high-cardinality-key",{"type":53,"value":2637}," — Choose high-cardinality column",{"type":47,"tag":794,"props":2639,"children":2640},{},[2641,2646],{"type":47,"tag":66,"props":2642,"children":2644},{"className":2643},[],[2645],{"type":53,"value":702},{"type":53,"value":2647}," — Composite key to fix data skew",{"type":47,"tag":794,"props":2649,"children":2650},{},[2651,2657],{"type":47,"tag":66,"props":2652,"children":2654},{"className":2653},[],[2655],{"type":53,"value":2656},"schema-bucket-target-size",{"type":53,"value":2658}," — Target 1-10 GB per tablet",{"type":47,"tag":794,"props":2660,"children":2661},{},[2662,2668],{"type":47,"tag":66,"props":2663,"children":2665},{"className":2664},[],[2666],{"type":53,"value":2667},"schema-bucket-cloud-mandatory-hash",{"type":53,"value":2669}," — Cloud MoW requires HASH",{"type":47,"tag":86,"props":2671,"children":2673},{"id":2672},"sort-key-critical-5-rules",[2674],{"type":53,"value":2675},"Sort Key — CRITICAL (5 rules)",{"type":47,"tag":788,"props":2677,"children":2678},{},[2679,2689,2699,2710,2721],{"type":47,"tag":794,"props":2680,"children":2681},{},[2682,2687],{"type":47,"tag":66,"props":2683,"children":2685},{"className":2684},[],[2686],{"type":53,"value":515},{"type":53,"value":2688}," — High selectivity first",{"type":47,"tag":794,"props":2690,"children":2691},{},[2692,2697],{"type":47,"tag":66,"props":2693,"children":2695},{"className":2694},[],[2696],{"type":53,"value":745},{"type":53,"value":2698}," — Fixed-length before VARCHAR",{"type":47,"tag":794,"props":2700,"children":2701},{},[2702,2708],{"type":47,"tag":66,"props":2703,"children":2705},{"className":2704},[],[2706],{"type":53,"value":2707},"schema-keys-prefix-index-limits",{"type":53,"value":2709}," — 36 bytes max, VARCHAR terminates it",{"type":47,"tag":794,"props":2711,"children":2712},{},[2713,2719],{"type":47,"tag":66,"props":2714,"children":2716},{"className":2715},[],[2717],{"type":53,"value":2718},"schema-keys-cluster-key-for-mow",{"type":53,"value":2720}," — Cluster key for UNIQUE tables",{"type":47,"tag":794,"props":2722,"children":2723},{},[2724,2730],{"type":47,"tag":66,"props":2725,"children":2727},{"className":2726},[],[2728],{"type":53,"value":2729},"schema-keys-avoid-float",{"type":53,"value":2731}," — No FLOAT\u002FDOUBLE in sort key",{"type":47,"tag":86,"props":2733,"children":2735},{"id":2734},"data-types-high-5-rules",[2736],{"type":53,"value":2737},"Data Types — HIGH (5 rules)",{"type":47,"tag":788,"props":2739,"children":2740},{},[2741,2752,2763,2773,2783],{"type":47,"tag":794,"props":2742,"children":2743},{},[2744,2750],{"type":47,"tag":66,"props":2745,"children":2747},{"className":2746},[],[2748],{"type":53,"value":2749},"schema-types-native-vs-string",{"type":53,"value":2751}," — Native types, not STRING",{"type":47,"tag":794,"props":2753,"children":2754},{},[2755,2761],{"type":47,"tag":66,"props":2756,"children":2758},{"className":2757},[],[2759],{"type":53,"value":2760},"schema-types-zonemap-limitations",{"type":53,"value":2762}," — JSON\u002FARRAY disable ZoneMap",{"type":47,"tag":794,"props":2764,"children":2765},{},[2766,2771],{"type":47,"tag":66,"props":2767,"children":2769},{"className":2768},[],[2770],{"type":53,"value":394},{"type":53,"value":2772}," — VARIANT for semi-structured JSON",{"type":47,"tag":794,"props":2774,"children":2775},{},[2776,2781],{"type":47,"tag":66,"props":2777,"children":2779},{"className":2778},[],[2780],{"type":53,"value":372},{"type":53,"value":2782}," — BITMAP_UNION for exact count-distinct",{"type":47,"tag":794,"props":2784,"children":2785},{},[2786,2792],{"type":47,"tag":66,"props":2787,"children":2789},{"className":2788},[],[2790],{"type":53,"value":2791},"schema-types-doris-specifics",{"type":53,"value":2793}," — DATETIME precision, VARCHAR vs STRING",{"type":47,"tag":86,"props":2795,"children":2797},{"id":2796},"indexes-high-7-rules",[2798],{"type":53,"value":2799},"Indexes — HIGH (7 rules)",{"type":47,"tag":788,"props":2801,"children":2802},{},[2803,2814,2825,2835,2846,2857],{"type":47,"tag":794,"props":2804,"children":2805},{},[2806,2812],{"type":47,"tag":66,"props":2807,"children":2809},{"className":2808},[],[2810],{"type":53,"value":2811},"schema-index-bloomfilter",{"type":53,"value":2813}," — BloomFilter for equality",{"type":47,"tag":794,"props":2815,"children":2816},{},[2817,2823],{"type":47,"tag":66,"props":2818,"children":2820},{"className":2819},[],[2821],{"type":53,"value":2822},"schema-index-inverted",{"type":53,"value":2824}," — Inverted for text\u002Frange",{"type":47,"tag":794,"props":2826,"children":2827},{},[2828,2833],{"type":47,"tag":66,"props":2829,"children":2831},{"className":2830},[],[2832],{"type":53,"value":579},{"type":53,"value":2834}," — NGram for LIKE %pattern%",{"type":47,"tag":794,"props":2836,"children":2837},{},[2838,2844],{"type":47,"tag":66,"props":2839,"children":2841},{"className":2840},[],[2842],{"type":53,"value":2843},"schema-index-bitmap",{"type":53,"value":2845}," — Bitmap for medium cardinality",{"type":47,"tag":794,"props":2847,"children":2848},{},[2849,2855],{"type":47,"tag":66,"props":2850,"children":2852},{"className":2851},[],[2853],{"type":53,"value":2854},"schema-index-vector",{"type":53,"value":2856}," — HNSW\u002FIVF for ANN search",{"type":47,"tag":794,"props":2858,"children":2859},{},[2860,2865],{"type":47,"tag":66,"props":2861,"children":2863},{"className":2862},[],[2864],{"type":53,"value":350},{"type":53,"value":2866}," — Full-text MATCH + BM25",{"type":47,"tag":86,"props":2868,"children":2870},{"id":2869},"query-acceleration-high-3-rules",[2871],{"type":53,"value":2872},"Query Acceleration — HIGH (3 rules)",{"type":47,"tag":788,"props":2874,"children":2875},{},[2876,2886,2896],{"type":47,"tag":794,"props":2877,"children":2878},{},[2879,2884],{"type":47,"tag":66,"props":2880,"children":2882},{"className":2881},[],[2883],{"type":53,"value":651},{"type":53,"value":2885}," — Sync MV for single-table aggregation",{"type":47,"tag":794,"props":2887,"children":2888},{},[2889,2894],{"type":47,"tag":66,"props":2890,"children":2892},{"className":2891},[],[2893],{"type":53,"value":673},{"type":53,"value":2895}," — Async MV for multi-table JOIN",{"type":47,"tag":794,"props":2897,"children":2898},{},[2899,2904],{"type":47,"tag":66,"props":2900,"children":2902},{"className":2901},[],[2903],{"type":53,"value":680},{"type":53,"value":2905}," — Operational limits (50M rows, 3 concurrent)",{"type":47,"tag":86,"props":2907,"children":2909},{"id":2908},"table-properties-highmedium-2-rules",[2910],{"type":53,"value":2911},"Table Properties — HIGH\u002FMEDIUM (2 rules)",{"type":47,"tag":788,"props":2913,"children":2914},{},[2915,2926],{"type":47,"tag":794,"props":2916,"children":2917},{},[2918,2924],{"type":47,"tag":66,"props":2919,"children":2921},{"className":2920},[],[2922],{"type":53,"value":2923},"schema-props-cloud-forced",{"type":53,"value":2925}," — Cloud mode forced properties",{"type":47,"tag":794,"props":2927,"children":2928},{},[2929,2934],{"type":47,"tag":66,"props":2930,"children":2932},{"className":2931},[],[2933],{"type":53,"value":629},{"type":53,"value":2935}," — LZ4 vs ZSTD compression",{"type":47,"tag":86,"props":2937,"children":2939},{"id":2938},"caching-medium-2-rules",[2940],{"type":53,"value":2941},"Caching — MEDIUM (2 rules)",{"type":47,"tag":788,"props":2943,"children":2944},{},[2945,2956],{"type":47,"tag":794,"props":2946,"children":2947},{},[2948,2954],{"type":47,"tag":66,"props":2949,"children":2951},{"className":2950},[],[2952],{"type":53,"value":2953},"schema-cache-file-cache",{"type":53,"value":2955}," — File cache for cloud mode",{"type":47,"tag":794,"props":2957,"children":2958},{},[2959,2965],{"type":47,"tag":66,"props":2960,"children":2962},{"className":2961},[],[2963],{"type":53,"value":2964},"schema-cache-query-partition",{"type":53,"value":2966}," — Query and partition cache",{"type":47,"tag":2968,"props":2969,"children":2970},"style",{},[2971],{"type":53,"value":2972},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2974,"total":1408},[2975,2992,2998,3014,3026,3036,3046],{"slug":2976,"name":2976,"fn":2977,"description":2978,"org":2979,"tags":2980,"stars":22,"repoUrl":23,"updatedAt":2991},"doris-architecture-advisor","design Apache Doris data architectures","Workload-aware architecture design for Apache Doris. MUST USE when designing data architectures, choosing between data models, planning ingestion strategies, sizing clusters, or translating business requirements into Apache Doris system designs. Complements doris-best-practices with decision frameworks and sizing-first workflow. Use when user describes a workload involving: IoT, sensor data, telemetry, real-time analytics, dashboard, log analysis, log search, CDC sync, time-series, device monitoring, point query service, ad-hoc analytics, lakehouse federation, ETL\u002FELT pipeline, report analytics, clickstream, user behavior, observability, metrics, fleet tracking, or any OLAP workload requiring table design from scratch. Also triggers on prompts like: \"design a table for...\", \"how should I store...\", \"build an architecture for...\", \"we have X devices sending data every Y seconds\", \"recommend a cluster size for...\", \"what data model should I use for...\", \"we need to ingest X GB\u002Fday\", \"migrate from MySQL\u002FPostgreSQL to Apache Doris\". Also use for legacy analytics\u002Fsearch\u002Fserving stack consolidation prompts even when Apache Doris is not named explicitly, including replacing or migrating from Impala, Kudu, Elasticsearch\u002FES, Greenplum, Presto, HBase, Hive, Hadoop, Redis, or Lambda-style multi-engine data platforms.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2981,2984,2987,2990],{"name":2982,"slug":2983,"type":15},"Architecture","architecture",{"name":2985,"slug":2986,"type":15},"Data Engineering","data-engineering",{"name":2988,"slug":2989,"type":15},"Data Pipeline","data-pipeline",{"name":17,"slug":18,"type":15},"2026-07-12T08:35:33.88758",{"slug":4,"name":4,"fn":5,"description":6,"org":2993,"tags":2994,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2995,2996,2997],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":2999,"name":2999,"fn":3000,"description":3001,"org":3002,"tags":3003,"stars":22,"repoUrl":23,"updatedAt":3013},"doris-debug","diagnose Apache Doris production issues","Apache Doris production diagnostics router. Use when Apache Doris queries are slow, imports are failing or timing out, compaction is raising -235 errors, nodes are OOM or crashing, materialized views are not rewriting, or tablet\u002Freplica health is degraded. Routes to the appropriate doris-debug-* skill. Covers shared-nothing and cloud (storage-compute separation) deployments.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3004,3007,3010],{"name":3005,"slug":3006,"type":15},"Debugging","debugging",{"name":3008,"slug":3009,"type":15},"Monitoring","monitoring",{"name":3011,"slug":3012,"type":15},"Operations","operations","2026-07-25T05:56:31.330361",{"slug":3015,"name":3015,"fn":3016,"description":3017,"org":3018,"tags":3019,"stars":22,"repoUrl":23,"updatedAt":3025},"doris-debug-cloud","debug Apache Doris cloud mode issues","Use for Doris storage-compute separation (cloud mode) issues: meta-service latency, cache miss storms, object store throughput, and shared-nothing config conflicts in compute groups.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3020,3023,3024],{"name":3021,"slug":3022,"type":15},"Cloud","cloud",{"name":3005,"slug":3006,"type":15},{"name":13,"slug":14,"type":15},"2026-07-25T05:56:24.239866",{"slug":3027,"name":3027,"fn":3028,"description":3029,"org":3030,"tags":3031,"stars":22,"repoUrl":23,"updatedAt":3035},"doris-debug-compaction","resolve Apache Doris compaction lag","Use for Doris -235 \u002F too many versions and compaction lag. Error raised in RowsetBuilder::check_tablet_version_count when version_count > max_tablet_version_num (default 2000) or meta serialize size limit.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3032,3033,3034],{"name":17,"slug":18,"type":15},{"name":3005,"slug":3006,"type":15},{"name":13,"slug":14,"type":15},"2026-07-25T05:56:31.974921",{"slug":3037,"name":3037,"fn":3038,"description":3039,"org":3040,"tags":3041,"stars":22,"repoUrl":23,"updatedAt":3045},"doris-debug-data-lake","debug Apache Doris data lake connectivity","Use for Doris external catalog issues: Hive\u002FIceberg\u002FPaimon\u002FHudi query failures, metadata refresh, filesystem S3\u002FHDFS connectivity, external MV rewrite misses.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3042,3043,3044],{"name":2985,"slug":2986,"type":15},{"name":17,"slug":18,"type":15},{"name":3005,"slug":3006,"type":15},"2026-07-25T05:56:23.920304",{"slug":3047,"name":3047,"fn":3048,"description":3049,"org":3050,"tags":3051,"stars":22,"repoUrl":23,"updatedAt":3057},"doris-debug-deployment","troubleshoot Apache Doris deployment failures","Use for Doris FE\u002FBE startup failures, port conflicts, priority_networks misrouting, meta_dir corruption, and ADD\u002FDROP BACKEND issues.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3052,3053,3056],{"name":3005,"slug":3006,"type":15},{"name":3054,"slug":3055,"type":15},"Deployment","deployment",{"name":3011,"slug":3012,"type":15},"2026-07-25T05:56:21.494401",{"items":3059,"total":3209},[3060,3077,3091,3102,3115,3128,3146,3157,3167,3178,3188,3198],{"slug":3061,"name":3061,"fn":3062,"description":3063,"org":3064,"tags":3065,"stars":3074,"repoUrl":3075,"updatedAt":3076},"datafusion-python","write Apache DataFusion Python code","Use when the user is writing datafusion-python (Apache DataFusion Python bindings) DataFrame or SQL code. Covers imports, data loading, DataFrame operations, expression building, SQL-to-DataFrame mappings, idiomatic patterns, and common pitfalls.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3066,3069,3072],{"name":3067,"slug":3068,"type":15},"Data Analysis","data-analysis",{"name":3070,"slug":3071,"type":15},"Python","python",{"name":3073,"slug":1282,"type":15},"SQL",593,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fdatafusion-python","2026-07-12T08:36:04.957626",{"slug":3078,"name":3078,"fn":3079,"description":3080,"org":3081,"tags":3082,"stars":3088,"repoUrl":3089,"updatedAt":3090},"bydbql","generate and execute BanyanDB BydbQL queries","Generate, validate, and optionally execute read-only BanyanDB BydbQL for STREAM, MEASURE, TRACE, and PROPERTY resources. Use when the user asks to query BanyanDB, translate natural language to BydbQL, inspect BanyanDB schema or data, validate BydbQL, or fetch raw BanyanDB records.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3083,3086,3087],{"name":3084,"slug":3085,"type":15},"Analytics","analytics",{"name":17,"slug":18,"type":15},{"name":3073,"slug":1282,"type":15},344,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking-banyandb","2026-07-12T08:31:01.294423",{"slug":3092,"name":3092,"fn":3093,"description":3094,"org":3095,"tags":3096,"stars":3088,"repoUrl":3089,"updatedAt":3101},"compiling","compile and build BanyanDB projects","Compile and build the SkyWalking BanyanDB project. Use when the user asks to compile, build, or generate code for this project.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3097,3100],{"name":3098,"slug":3099,"type":15},"Build","build",{"name":20,"slug":21,"type":15},"2026-07-12T08:31:06.373309",{"slug":3103,"name":3103,"fn":3104,"description":3105,"org":3106,"tags":3107,"stars":3088,"repoUrl":3089,"updatedAt":3114},"gh-pull-request","create GitHub pull requests for BanyanDB","Create a GitHub pull request for SkyWalking BanyanDB. Use when the user asks to create a PR, submit changes, or open a pull request.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3108,3111],{"name":3109,"slug":3110,"type":15},"GitHub","github",{"name":3112,"slug":3113,"type":15},"Pull Requests","pull-requests","2026-07-12T08:31:03.792415",{"slug":3116,"name":3116,"fn":3117,"description":3118,"org":3119,"tags":3120,"stars":3088,"repoUrl":3089,"updatedAt":3127},"vendor-update","update Go and Node.js vendor dependencies","Upgrade Go\u002FNode.js vendor dependencies and sync tool versions. Use whenever the user says \"upgrade dependencies\", \"update vendors\", \"vendor update\", \"run vendor-upgrade\", \"bump dependencies\", \"update packages\", or asks to run the `vendor-update` Make target. This skill also checks `scripts\u002Fbuild\u002Fversion.mk` after upgrading to see if any tracked tool versions need updating too, and removes stale binaries from `bin\u002F` when versions change.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3121,3124],{"name":3122,"slug":3123,"type":15},"Go","go",{"name":3125,"slug":3126,"type":15},"Node.js","node-js","2026-07-12T08:31:02.555555",{"slug":3129,"name":3129,"fn":3130,"description":3131,"org":3132,"tags":3133,"stars":3143,"repoUrl":3144,"updatedAt":3145},"cayenne-cgen","generate Cayenne entity Java classes","Use this skill whenever the user wants to (re)generate Cayenne entity Java classes from a DataMap. Trigger on phrases like 'generate Java classes', 'regenerate entities', 'run cgen', 'create the entity classes', 'why is the Artist class missing fields', 'where did the `_Abstract*` classes come from', 'sync the entity classes with the model', or any request to materialize Java from the DataMap. Also trigger as a follow-up after modeling changes (someone added an entity, attribute, or relationship and now the Java side is stale). This skill exclusively uses the `mcp__cayenne__cgen_run` MCP tool — it does NOT use `mvn cayenne:cgen` or the Gradle cgen task.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3134,3137,3140],{"name":3135,"slug":3136,"type":15},"Data Modeling","data-modeling",{"name":3138,"slug":3139,"type":15},"Java","java",{"name":3141,"slug":3142,"type":15},"ORM","orm",343,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fcayenne","2026-07-12T08:32:33.575211",{"slug":3147,"name":3147,"fn":3148,"description":3149,"org":3150,"tags":3151,"stars":3143,"repoUrl":3144,"updatedAt":3156},"cayenne-db-import","import database schema into Cayenne DataMaps","Use this skill when the user wants to import database schema metadata into a Cayenne DataMap — the *model\u002Fmapping only*, not names or Java classes. Trigger on phrases like 'reverse engineer the database', 'import the schema', 'generate a DataMap from my DB', 'add the new tables from the DB into the model', 'import the customer table', 'create entities from these tables', or any request to read database metadata to populate or update a DataMap's XML. This is for *full schema* or *bulk table* import; one-off a-la-carte entity additions belong in the cayenne-modeling skill. IMPORTANT — scope: this imports the mapping ONLY; it does not clean up the Object-layer names or (re)generate Java classes. When the user wants their whole project brought in line with the DB ('sync my project with the database', 'my schema changed, update everything', 'update my entities\u002Fclasses from the DB'), that is the end-to-end `cayenne-full-db-sync` skill, which runs this import and then name cleanup and class generation. To regenerate classes alone use `cayenne-cgen`. The skill runs reverse engineering directly via the `mcp__cayenne__dbimport_run` MCP tool when a DBConnector is already configured; otherwise it opens the CayenneModeler GUI via `mcp__cayenne__open_project` to configure the connection first.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3152,3153,3154,3155],{"name":17,"slug":18,"type":15},{"name":3138,"slug":3139,"type":15},{"name":3141,"slug":3142,"type":15},{"name":3073,"slug":1282,"type":15},"2026-07-19T05:40:33.655062",{"slug":3158,"name":3158,"fn":3159,"description":3160,"org":3161,"tags":3162,"stars":3143,"repoUrl":3144,"updatedAt":3166},"cayenne-full-db-sync","synchronize Cayenne projects with database","Use this skill when the user wants to bring their WHOLE Cayenne project in line with the database in one shot — the mapping, the Object-layer names, and the generated Java classes together. This is the end-to-end 'sync with the DB' workflow, and it orchestrates three skills in order: `cayenne-db-import` (import schema metadata into the DataMap) → `cayenne-model-naming` (polish the just-imported names) → `cayenne-cgen` (regenerate Java classes). Trigger on holistic phrases like 'sync my project with the database', 'sync with the DB', 'my schema changed, update everything', 'update my entities\u002Fclasses from the database', 'reverse engineer and regenerate the classes', 'import the new tables and rebuild the entities', 'full DB sync', 'bring the model and classes up to date with the DB'. The distinguishing signal is scope: the user wants the whole project (mapping + names + Java code), not just one stage. For the *model\u002Fmapping only* (no name cleanup, no class generation) use `cayenne-db-import`; to (re)generate classes alone use `cayenne-cgen`; to clean names alone use `cayenne-model-naming`. Uses the `mcp__cayenne__dbimport_run` and `mcp__cayenne__cgen_run` MCP tools via the sub-skills; does NOT use Maven or Gradle goals.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3163,3164,3165],{"name":17,"slug":18,"type":15},{"name":3138,"slug":3139,"type":15},{"name":3141,"slug":3142,"type":15},"2026-07-19T06:03:49.112969",{"slug":3168,"name":3168,"fn":3169,"description":3170,"org":3171,"tags":3172,"stars":3143,"repoUrl":3144,"updatedAt":3177},"cayenne-model-naming","clean up Cayenne object-layer names","Use this skill to clean up Object-layer names in a Cayenne DataMap — ObjEntity, ObjAttribute, and ObjRelationship names, plus DbRelationship names (the first-class unit of relationship cleanup — every FK has one whether or not an ObjRelationship was generated; the ObjRelationship name is synced to it when one exists) — so they read as descriptive, consistent Java. Trigger on phrases like 'clean up the model names', 'fix the entity names', 'these names look ugly', 'make the names descriptive', 'normalize the ObjEntity\u002Fattribute\u002Frelationship names', 'why is this relationship called team1', 'rename entities to be consistent', 'the import produced Gametype instead of GameType'. Invoke it on an explicit user request, or as a manual follow-up after a `cayenne-db-import` to polish the just-imported additions — it is never triggered automatically. IMPORTANT: this is a LIGHT polish pass — CayenneModeler's reverse-engineering already produces good names for the common case; only improve the specific things its deterministic algorithm cannot (run-together names with no separators like `gametype`, meaningless numbered names like `team1` from multiple relationships between two tables, and a common entity prefix that leaks into relationship names like `aaOrders`). Do NOT rewrite names that are already correct. This is Obj-layer naming polish; for structural model edits use `cayenne-modeling`, and for regenerating classes afterward use `cayenne-cgen`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3173,3174,3175,3176],{"name":3135,"slug":3136,"type":15},{"name":17,"slug":18,"type":15},{"name":3138,"slug":3139,"type":15},{"name":3141,"slug":3142,"type":15},"2026-07-22T05:35:32.342548",{"slug":3179,"name":3179,"fn":3180,"description":3181,"org":3182,"tags":3183,"stars":3143,"repoUrl":3144,"updatedAt":3187},"cayenne-modeler","manage Cayenne projects with CayenneModeler","Use this skill when the user explicitly wants to open CayenneModeler (the GUI) on a Cayenne project, or when the modeling task is inherently visual — reverse engineering (delegated to cayenne-db-import), bulk relationship layout, multi-entity visual refactoring. Trigger on phrases like 'open the Modeler', 'open in CayenneModeler', 'launch the GUI', 'edit visually', 'show me the project in the Modeler'. Do NOT trigger as a fallback for ordinary a-la-carte XML edits — those belong in the cayenne-modeling skill, which is faster and doesn't require the user to context-switch.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3184,3185,3186],{"name":3135,"slug":3136,"type":15},{"name":3138,"slug":3139,"type":15},{"name":3141,"slug":3142,"type":15},"2026-07-12T08:32:37.199428",{"slug":3189,"name":3189,"fn":3190,"description":3191,"org":3192,"tags":3193,"stars":3143,"repoUrl":3144,"updatedAt":3197},"cayenne-modeling","edit and extend Cayenne ORM models","Use this skill whenever the user wants to edit, inspect, or extend the Cayenne ORM model in a project — adding or modifying entities, attributes, relationships, embeddables, named queries, stored procedures, or DataNodes. Trigger on phrases like 'add an ObjEntity', 'add a DbEntity', 'add a relationship', 'expose this column as an attribute', 'create a new DataMap', 'add a named query', 'create an embeddable', 'add a stored procedure', 'change the attribute type', 'mark this column as nullable', 'rename this entity', or any mention of a Cayenne `*.map.xml` or `cayenne-*.xml` file. Also trigger when the user references modeling concepts (ObjEntity, DbEntity, ObjAttribute, DbAttribute, ObjRelationship, DbRelationship, Embeddable, dbEntityName, deleteRule, db-attribute-path, db-relationship-path, defaultPackage) in the context of a Cayenne-using app. This is the *primary* skill for a-la-carte ORM model manipulation — direct XML edits, not the Modeler GUI.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3194,3195,3196],{"name":17,"slug":18,"type":15},{"name":3138,"slug":3139,"type":15},{"name":3141,"slug":3142,"type":15},"2026-07-19T05:40:32.6889",{"slug":3199,"name":3199,"fn":3200,"description":3201,"org":3202,"tags":3203,"stars":3143,"repoUrl":3144,"updatedAt":3208},"cayenne-query","write and modify Cayenne database queries","Use this skill whenever the user wants to write or modify a Cayenne query — fetching entities by criteria, joining, prefetching to avoid N+1, ordering, paginating, aggregating, or running raw SQL through Cayenne. Trigger on phrases like 'query for X', 'fetch all artists where ...', 'write an ObjectSelect', 'use SQLSelect', 'use SelectById', 'add a prefetch', 'get distinct values', 'count rows', 'find by ID', 'load by primary key', 'build a Cayenne expression', 'why am I getting N+1', 'how do I paginate', 'select a single column', 'select columns into a DTO', 'named query in the DataMap'. Do NOT trigger for modeling changes (use cayenne-modeling) or runtime bootstrap (use cayenne-runtime).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3204,3205,3206,3207],{"name":17,"slug":18,"type":15},{"name":3138,"slug":3139,"type":15},{"name":3141,"slug":3142,"type":15},{"name":3073,"slug":1282,"type":15},"2026-07-12T08:32:35.072322",108]