Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions references/pre-aggregates/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ When a user runs a query, Lightdash automatically checks if a pre-aggregate can
- Every dimension used in **filters** is included in the pre-aggregate
- All metrics use [supported metric types](#supported-metric-types)
- The query does not contain custom dimensions, custom metrics, or table calculations
- If the query uses a time dimension, the requested granularity is **equal to or coarser** than the pre-aggregate's granularity (for example, a `day` pre-aggregate can serve `day`, `week`, `month`, or `year` queries, but not `hour`)
- If the query uses a time dimension, the requested granularity must be **equal to or coarser** than the pre-aggregate's granularity

<Tip>
If you pre-aggregate at **day** granularity, the cache hits for `day`, `week`, `month`, `quarter`, and `year` queries. If you pre-aggregate at **month** granularity, the cache hits for `month`, `quarter`, and `year` — but **not** for `day` or `week`, since those require finer-grained data.
A **day** pre-aggregate serves `day`, `week`, `month`, `quarter`, and `year` queries. A **month** pre-aggregate serves `month`, `quarter`, and `year` — but **not** `day` or `week`, since those need finer-grained data.
</Tip>

When multiple pre-aggregates match a query, Lightdash picks the smallest one (fewest dimensions, then fewest metrics as tiebreaker).
Expand Down
Loading