Skip to content

Commit

Permalink
Reduce database resources
Browse files Browse the repository at this point in the history
  • Loading branch information
kesmit13 committed Jul 19, 2024
1 parent c004cb2 commit 3beac28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/init_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
user=options.user, password=options.password,
) as conn:
with conn.cursor() as cur:
cur.execute('SET GLOBAL default_partitions_per_leaf=2')
cur.execute('SET GLOBAL log_file_size_partitions=1048576')
cur.execute('SET GLOBAL log_file_size_ref_dbs=1048576')
cur.execute(f'CREATE DATABASE IF NOT EXISTS {database};')
cur.execute(f'USE {database};')
if options.http_port:
Expand Down

0 comments on commit 3beac28

Please sign in to comment.