Skip to content

docs: expand aggregating indexes guidance#11035

Open
AvilaJulio wants to merge 1 commit into
cube-js:masterfrom
AvilaJulio:docs/expand-aggregating-indexes
Open

docs: expand aggregating indexes guidance#11035
AvilaJulio wants to merge 1 commit into
cube-js:masterfrom
AvilaJulio:docs/expand-aggregating-indexes

Conversation

@AvilaJulio

Copy link
Copy Markdown
Member

Description

Expands the documentation on pre-aggregation indexes and aggregating indexes. The previous text described aggregating indexes in isolation and left it unclear how they relate to regular indexes or when to choose one over the other.

Changes

docs-mintlify/docs/pre-aggregations/using-pre-aggregations.mdx — reworked the "Aggregating indexes" section:

  • Clarified the conceptual difference: a regular index is a sorted copy of the full pre-aggregation; an aggregating index is a rollup of the rollup, storing only its listed dimensions + pre-aggregated measures.
  • Added a regular vs. aggregating comparison table.
  • Added a "When to use an aggregating index" section, including the cost argument vs. defining a second pre-aggregation (N aggregating indexes are built from one warehouse read).
  • Added a "How regular and aggregating indexes work together" section explaining that both can be defined on the same pre-aggregation and that Cube Store prefers a qualifying aggregating index, falling back to a regular/default index otherwise.
  • Spelled out the eligibility requirements: additive measures only (sum/count/min/max/countDistinctApprox — not avg or exact countDistinct), and all query dimensions and filters must be columns of the index.
  • Added a "Putting it together" worked example showing both index types on one pre-aggregation and which of two example queries routes to each.

docs-mintlify/reference/data-modeling/pre-aggregations.mdx — added a <Note> to the type option documenting the same eligibility constraints.

Notes

  • Documentation only — no code changes.
  • All edits are in the active Mintlify docs (/docs-mintlify); the legacy /docs site was intentionally not touched.
  • The behavior described (aggregating index preferred when a query qualifies; fallback to regular indexes; additive-measure-only constraint) reflects the Cube Store query planner (optimal_index_by_score / check_aggregates_expr in rust/cubestore/.../queryplanner/planning.rs).

🤖 Generated with Claude Code

Explain how regular and aggregating indexes interact within a single
pre-aggregation: Cube Store prefers a qualifying aggregating index and
falls back to regular indexes otherwise. Add a regular-vs-aggregate
comparison table, eligibility requirements (additive measures only; all
query dimensions and filters must be index columns), a worked example
showing both index types and which query each routes to, and a
constraint note in the pre-aggregations reference.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant