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 3beac28 commit 34b5974
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions singlestoredb/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ def load_sql(sql_file: str) -> str:
with open(sql_file, 'r') as infile:
with s2.connect(**args) 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')

if not dbname:
dbname = 'TEST_{}'.format(uuid.uuid4()).replace('-', '_')
cur.execute(f'CREATE DATABASE {dbname};')
Expand Down

0 comments on commit 34b5974

Please sign in to comment.