diff --git a/hive/db/sql_scripts/update_notification_cache.sql b/hive/db/sql_scripts/update_notification_cache.sql index 505fbb59835f76e8f79dc0606af94ac160712410..d8872c0958b865b34f62a3e2480026135ea4490b 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;