From 5f398255137b00971c754b6bc6ff68682b93a8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Thu, 26 Sep 2024 17:37:45 +0200 Subject: [PATCH] chore(batch-exports): Add (more) memory limits to persons query (#25225) --- posthog/temporal/batch_exports/batch_exports.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/posthog/temporal/batch_exports/batch_exports.py b/posthog/temporal/batch_exports/batch_exports.py index 5fe76ff1466..fe874fe470e 100644 --- a/posthog/temporal/batch_exports/batch_exports.py +++ b/posthog/temporal/batch_exports/batch_exports.py @@ -55,9 +55,11 @@ FROM interval_end={interval_end} ) AS persons FORMAT ArrowStream --- This is half of configured MAX_MEMORY_USAGE for batch exports. --- TODO: Make the setting available to all queries. -SETTINGS max_bytes_before_external_group_by=50000000000 +SETTINGS + -- This is half of configured MAX_MEMORY_USAGE for batch exports. + -- TODO: Make the setting available to all queries. + max_bytes_before_external_group_by=50000000000, + max_bytes_before_external_sort=50000000000 """ SELECT_FROM_EVENTS_VIEW = Template(