some micro optimizations for sqlite3 enabled
This commit is contained in:
parent
3fc2a6e03d
commit
599fc57dd8
1 changed files with 6 additions and 0 deletions
6
ubot.py
6
ubot.py
|
@ -192,6 +192,12 @@ async def main():
|
|||
)''')
|
||||
conn.commit()
|
||||
logger.debug('sqlite3 database initialized')
|
||||
logger.debug('optimizing database...')
|
||||
c.execute('PRAGMA optimize')
|
||||
c.execute('PRAGMA journal_mode = WAL')
|
||||
c.execute('PRAGMA synchronous = normal')
|
||||
c.execute('VACUUM')
|
||||
logger.debug('optimized')
|
||||
|
||||
####################################################################
|
||||
|
||||
|
|
Loading…
Reference in a new issue