Tune DuckDB connection settings for better S3 query performance
Add http_keep_alive, http_retries, preserve_insertion_order to _init_db(). Bump memory_limit from 4GB to 6GB to match available server RAM.
This commit is contained in:
5
auth.py
5
auth.py
@@ -23,7 +23,10 @@ def _init_db():
|
|||||||
SET s3_url_style='path';
|
SET s3_url_style='path';
|
||||||
SET enable_object_cache=true;
|
SET enable_object_cache=true;
|
||||||
SET threads=4;
|
SET threads=4;
|
||||||
SET memory_limit='4GB';
|
SET memory_limit='6GB';
|
||||||
|
SET preserve_insertion_order=false;
|
||||||
|
SET http_keep_alive=true;
|
||||||
|
SET http_retries=3;
|
||||||
""")
|
""")
|
||||||
_con.execute("ATTACH '/app/data/basedosdados.duckdb' AS basedosdados (READ_ONLY)")
|
_con.execute("ATTACH '/app/data/basedosdados.duckdb' AS basedosdados (READ_ONLY)")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user