Skip to content

Instantly share code, notes, and snippets.

@brucejo75
Created December 1, 2017 01:22
Show Gist options
  • Save brucejo75/09ec7877bbb5e08140db2912524acd11 to your computer and use it in GitHub Desktop.
Save brucejo75/09ec7877bbb5e08140db2912524acd11 to your computer and use it in GitHub Desktop.
SQLite Journal Mode Perf Compare 1

meteor run, 1 project, first run

journal_mode=WAL

SQL statement  PRAGMA journal_mode=WAL  took  27
Transaction took:  2
Transaction took:  1
Transaction took:  0
Transaction took:  0
Transaction took:  2
Transaction took:  0
Transaction took:  1
Transaction took:  0
Transaction took:  1
Transaction took:  2
Transaction took:  0
Transaction took:  0
Transaction took:  0
SQL statement  BEGIN IMMEDIATE TRANSACTION  took  18890
Transaction took:  19302

journal_mod=TRUNCATE:

SQL statement  PRAGMA journal_mode=TRUNCATE  took  30
Transaction took:  11
Transaction took:  1
Transaction took:  1
Transaction took:  0
Transaction took:  1
Transaction took:  0
Transaction took:  0
Transaction took:  0
Transaction took:  0
Transaction took:  1
Transaction took:  1
Transaction took:  1
Transaction took:  1
SQL statement  BEGIN IMMEDIATE TRANSACTION  took  23263
Transaction took:  23400

meteor run, 1 project, Second run

I took a 2nd set of timings and see some variation that makes me think that any differences are not significant.

2nd journal_mode=WAL:

SQL statement  PRAGMA journal_mode=WAL  took  25
Transaction took:  7
Transaction took:  2
Transaction took:  1
Transaction took:  0
Transaction took:  1
Transaction took:  0
Transaction took:  0
Transaction took:  1
Transaction took:  0
Transaction took:  0
Transaction took:  0
Transaction took:  0
Transaction took:  0
SQL statement  BEGIN IMMEDIATE TRANSACTION  took  18979
Transaction took:  19484

2nd journal_mod=TRUNCATE:

SQL statement  PRAGMA journal_mode=TRUNCATE  took  26
Transaction took:  2
Transaction took:  0
Transaction took:  1
Transaction took:  0
Transaction took:  1
Transaction took:  1
Transaction took:  0
Transaction took:  0
Transaction took:  0
Transaction took:  2
Transaction took:  1
Transaction took:  0
Transaction took:  1
SQL statement  BEGIN IMMEDIATE TRANSACTION  took  19167
SQL statement  SELECT content FROM releaseVersions WHERE track=?  took  11
Transaction took:  19583
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment