Aggregate table

An aggregate table stores in advance already-computed results (sums, counts per day, per product) at a coarser grain than the fact table. It speeds up dashboards and reduces the cost of repeated queries, in exchange for update logic and a risk of drift from the source.

Example

CREATE TABLE agg_ventes_jour AS SELECT date_vente, SUM(montant) AS ca FROM fait_ventes GROUP BY 1;

Related concepts

The whole glossary