Skip to content

Instantly share code, notes, and snippets.

@Khatskevich
Last active April 2, 2018 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Khatskevich/31a2da6ab46ce903120e7a03d65966db to your computer and use it in GitHub Desktop.
Save Khatskevich/31a2da6ab46ce903120e7a03d65966db to your computer and use it in GitHub Desktop.
Tarantool SQL scan speed test for different revisions
Tree without hints:
Start insertion
time = 90.542766
nsec/N = 5396.769397
Select iterator
time = 2.593135
nsec/N = 154.562873
Select one by one rand
time = 47.827984
nsec/N = 2850.770016
Select one by one seq
time = 6.276832
nsec/N = 374.128316
Select one by one rand over 1000
time = 4.375830
nsec/N = 260.819785
t1 sum result is 387533074215443
t1 n is 13201692
Tree with hints:
Start insertion
time = 65.275290
nsec/N = 3890.710470
Select iterator
time = 2.781735
nsec/N = 165.804311
Select one by one rand
time = 15.951208
nsec/N = 950.766079
Select one by one seq
time = 3.051712
nsec/N = 181.896193
Select one by one rand over 1000
time = 1.412447
nsec/N = 84.188387
t1 sum result is 387625964902124
t1 n is 13201523
On more data (52Mxint)
Tree without hints:
Start insertion
time = 431.754767
nsec/N = 6433.647373
Select iterator
time = 13.129888
nsec/N = 195.650583
Select one by one rand
time = 269.927319
nsec/N = 4022.230493
t1 sum result is 5315496215050171
t1 n is 52808462
Tree with hints:
Start insertion
time = 301.103268
nsec/N = 4486.788328
Select iterator
time = 14.333525
nsec/N = 213.586169
Select one by one rand
time = 86.037845
nsec/N = 1282.063802
t1 sum result is 5316267369352618
t1 n is 52811660
Create 16.78M tuples | Sum 20 times | name
0.0326464 | 0.199856 | raw c sequential
| 31.171148 | raw c random access
0.886 | 0.78 | clickhouse 1.1.54370 (some times wrong result in `insert t from select from t`)
10.344823 | 9.53592 | tarantool gcc capi single replace statement + wal
11.761084 | 9.625517 | tarantool gcc capi
12.144 | 15.656 | sqlite 3.22.0 memory amalgamation wothout rowid -Ofast -march=native
12.388 | 16.046 | sqlite 3.22.0 memory amalgamation wothout rowid
15.448 | 17.936 | sqlite 3.22.0 memory amalgamation
16.078 | 21.254 | sqlite 3.22.0 memory
18.321 | 19.531 | sqlite 3.22.0 disk amalgamation
19.718 | 22.796 | sqlite 3.10.2 memory amalgamation
23.829 | 31.122 | sqlite 3.10.2 disk amalgamation
21.466848 | 187.187505 | Tarantool gcc sequential LUA
30.029957 | 102.246504 | Tarantool gcc capi non-sequential (random) insert + hints (covering index)
34.807 | 29.73 | Mysql 5.7.21 Engine = memory
36.947658 | 25.030331 | Tarantool clang LTO
39.305545 | 29.612456 | Tarantool gcc
40.197786 | 30.827455 | Tarantool clang
43.215058 | 30.857742 | Tarantool gcc lto
48.18 | 81.116 | Mysql 5.7.21 Engine = MYISAM
69.5845 | 39.5959 | postgres-9.6.6
80.075 | 89.739 | Mysql 5.7.21 Engine = inodb
42.617834 | 65.583245 | Tarantool gcc capi non-sequential (random) insert
68.152712 | 298.493147 | Tarantool gcc LUA non-sequential (random) insert
486.089196 | 659.73754 | Tarantool 1.7.5 vinyl single insert transaction vynil_memory=10G rand
344.098068 | 607.9949 | Tarantool 1.7.5 vinyl 16M insert transactions vynil_memory=10G rand
439.991999 | - | Tarantool 1.7.5 vinyl 16M insert transactions vynil_memory=default rand
269.849151 | - | Tarantool 1.7.5 vinyl 16M replace transactions vynil_memory=default seq
251.899712 | 588.97166 | Tarantool 2.0 vinyl 16M replace transactions vynil_memory=default seq
20.673509 | 477.27318 | Tarantool 2.0 vinyl single replace transactions vynil_memory=default seq
163.843576 | 638.08336 | Tarantool 2.0 vinyl single replace transactions vynil_memory=default rand
Machine Lenovo core i7 2cores + 2 hyperthreads, ssh, 16G
Create 16.78M tuples | 16.78M selects | name
94.284214 | 58.360501 | sql over 10
- | 58.780544 | sql seq
- | 111.800169 | sql rand
42.698709 | 3.003536 | c iterator
- | 5.357333 | c over 10
- | 6.183755 | c seq
- | 51.857383 | c rand
all inserts are random
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment