google / google/leveldb

SQLite benchmarks are completely WRONG

Open
#421 1 comment 1 reaction 0 assignees View on GitHub
bug
Dominant language
C++
Stars
39.4k
Forks
8.2k
PR merge metrics
No merged PRs in 30d

Description

To have comparable benchmarks:

instead of
`CREATE TABLE test (key blob, value blob, PRIMARY KEY(key))`
please use
`CREATE TABLE test (key blob not null, value blob not null, PRIMARY KEY(key)) WITHOUT ROWID`

and possibly even

```sql
CREATE TABLE test (
key blob not null,
value blob not null
PRIMARY KEY (key, value)
) WITHOUT ROWID
```
to enable index-only scan.

Also,
use `select value from ...` instead of `select * from`.

use `insert into` instead of `REPLACE INTO`.

issue `VACUUM` before making read-test.

Use latest SQLite version (3.15.0). It has in changelog:
`Miscellaneous micro-optimizations reduce CPU usage by more than 7% on common workloads.`

Also, mention in HTML 64-bit OS or 32-bit OS is used.

In order to benchmark, we MUST use fastest way to implement tasks for each technology.

After these fixes PLEASE update benchmarking page.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.