From 8bd09ea3191fed5f06eaba4f7a147a1e137893da Mon Sep 17 00:00:00 2001 From: Dan Notestein Date: Fri, 24 Jan 2025 15:12:06 -0500 Subject: [PATCH 1/2] start by disabling individual table tuning and test postgres defaults (changed since 14) --- hive/db/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hive/db/schema.py b/hive/db/schema.py index 964d8c4a2..9c5b9b3db 100644 --- a/hive/db/schema.py +++ b/hive/db/schema.py @@ -463,7 +463,7 @@ def setup(db, admin_db): build_metadata().create_all(db.engine()) # tune auto vacuum/analyze - reset_autovac(db) + #disable individual table tuning reset_autovac(db) # sets FILLFACTOR: set_fillfactor(db) -- GitLab From a7cf6e051123aae489c89bb65001c504a103d53a Mon Sep 17 00:00:00 2001 From: Dan Notestein Date: Sat, 25 Jan 2025 18:43:40 -0500 Subject: [PATCH 2/2] double work_mem for queries that use _execute_query_with_modified_work_mem --- hive/db/db_state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hive/db/db_state.py b/hive/db/db_state.py index ad9fe9911..5bb607a84 100644 --- a/hive/db/db_state.py +++ b/hive/db/db_state.py @@ -200,7 +200,7 @@ class DbState: def _execute_query_with_modified_work_mem( cls, db: Db, sql: str, explain: bool = False, value: Optional[str] = None, separate_transaction: bool = True ) -> None: - divide_factor = 64 + divide_factor = 32 _value = value or f'{int(get_memory_amount() / divide_factor)}MB' sql_show_work_mem = 'SHOW work_mem;' -- GitLab