https://github.com/benbjohnson/sqlite-bench
Miscellaneous Go/SQLite benchmarks
https://github.com/benbjohnson/sqlite-bench
Last synced: 9 months ago
JSON representation
Miscellaneous Go/SQLite benchmarks
- Host: GitHub
- URL: https://github.com/benbjohnson/sqlite-bench
- Owner: benbjohnson
- Created: 2020-10-29T16:08:09.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-04-11T00:41:22.000Z (almost 4 years ago)
- Last Synced: 2025-04-02T21:05:50.162Z (9 months ago)
- Language: Go
- Size: 2.93 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
sqlite-bench
============
This repository contains a small Go program for performing simple,
microbenchmarks of writes to a SQLite database. It is not meant to be
representative of real world use but is meant to give a general ballpark of
performance numbers given different journaling settings.
## Results
The following results were obtained on a MacBook Pro (13-inch, 2017), 2.3 GHz
Dual-Core Intel Core i5, with an APPLE SSD SM0128L disk.
### Journal mode DELETE
```sh
$ sqlite-bench -batch-count 1000 -batch-size 1000 -row-size 100 -journal-mode delete ~/bench.db
Inserts: 1000000 rows
Elapsed: 3.153s
Rate: 317175.758 insert/sec
File size: 110993408 bytes
```
### Journal mode WAL, Synchronous FULL
```sh
sqlite-bench -batch-count 1000 -batch-size 1000 -row-size 100 -journal-mode wal ~/bench.db
Inserts: 1000000 rows
Elapsed: 3.131s
Rate: 319398.103 insert/sec
File size: 110993408 bytes
```
### Journal mode WAL, Synchronous NORMAL
```sh
sqlite-bench -batch-count 1000 -batch-size 1000 -row-size 100 -journal-mode wal -synchronous normal ~/bench.db
Inserts: 1000000 rows
Elapsed: 2.544s
Rate: 393045.303 insert/sec
File size: 110993408 bytes
```
### Journal mode WAL, Synchronous OFF
This mode is completely unsafe. Please do not actually run this.
```sh
sqlite-bench -batch-count 1000 -batch-size 1000 -row-size 100 -journal-mode wal -synchronous off ~/bench.db
Inserts: 1000000 rows
Elapsed: 2.093s
Rate: 477827.165 insert/sec
File size: 110993408 bytes
```