From a9068eb6b058f7f1bc8de18937c4cb694ba57e8a Mon Sep 17 00:00:00 2001 From: Dan Notestein Date: Fri, 14 Mar 2025 15:36:21 +0000 Subject: [PATCH] increase work_mem for hivemind_app.update_notification_cache (cherry picked from commit 335f21b1a68a89e5e475a64cac3720a21ee77bf4) 4d5612b8 increase work_mem allowed for update_notification_cache a6708716 increase work_mem for get_discussion to avoid temp file creation 07e0a384 Revert "increase work_mem for get_discussion to avoid temp file creation" Co-authored-by: Dan Notestein --- hive/db/sql_scripts/update_notification_cache.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/hive/db/sql_scripts/update_notification_cache.sql b/hive/db/sql_scripts/update_notification_cache.sql index 505fbb598..d8872c095 100644 --- a/hive/db/sql_scripts/update_notification_cache.sql +++ b/hive/db/sql_scripts/update_notification_cache.sql @@ -7,6 +7,7 @@ $function$ DECLARE __limit_block hivemind_app.blocks_view.num%TYPE = hivemind_app.block_before_head( '90 days' ); BEGIN + SET LOCAL work_mem='256MB'; IF _first_block_num IS NULL THEN TRUNCATE TABLE hivemind_app.hive_notification_cache; ALTER SEQUENCE hivemind_app.hive_notification_cache_id_seq RESTART WITH 1; -- GitLab