Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
surykatka
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
surykatka
Commits
d59efeb4
Commit
d59efeb4
authored
May 18, 2021
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db: improve sqlite performance
parent
265a8ad6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/surykatka/db.py
src/surykatka/db.py
+9
-1
No files found.
src/surykatka/db.py
View file @
d59efeb4
...
...
@@ -26,7 +26,15 @@ from playhouse.migrate import migrate, SqliteMigrator
class
LogDB
:
def
__init__
(
self
,
sqlite_path
):
self
.
_db
=
SqliteExtDatabase
(
sqlite_path
,
pragmas
=
((
"journal_mode"
,
"WAL"
),
(
"foreign_keys"
,
1
))
sqlite_path
,
pragmas
=
(
(
"journal_mode"
,
"WAL"
),
(
"foreign_keys"
,
1
),
(
"wal_autocheckpoint"
,
5
),
(
"temp_store"
,
"MEMORY"
),
(
"synchronous"
,
"NORMAL"
),
(
"mmap_size"
,
30000000000
),
),
)
self
.
_db
.
connect
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment