Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(web-analytics): spill dimensional precompute inserts to disk (#117216)

Lucas Ricoy1743b7e1eb34
diff --git a/products/web_analytics/backend/hogql_queries/web_dimensional_precompute.py b/products/web_analytics/backend/hogql_queries/web_dimensional_precompute.py
index 74b0a3edda77..d8c24b9b7013 100644
--- a/products/web_analytics/backend/hogql_queries/web_dimensional_precompute.py
+++ b/products/web_analytics/backend/hogql_queries/web_dimensional_precompute.py
@@ -317,6 +317,7 @@ def ensure_web_stats_dimensional_precomputed(
placeholders=_base_placeholders(),
query_type="web_stats_dimensional_insert",
read_after_write=False,
+ spill_to_disk=True, # GROUP BY over every fixed dimension; a large team's day outgrows the memory limit
)
@@ -335,4 +336,5 @@ def ensure_web_bounces_dimensional_precomputed(
placeholders=_base_placeholders(),
query_type="web_bounces_dimensional_insert",
read_after_write=False,
+ spill_to_disk=True, # session-level GROUP BY over every fixed dimension; same memory profile as stats
)