号称用rust重写的sqlite数据库tursodb与sqlite及duckdb性能比较

一开始叫limbo,现在改名叫tursodb

C:\d>tursodb
Turso v0.1.5
Enter ".help" for usage hints.
This software is ALPHA, only use for development, testing, and experimentation.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database
turso> .timer on
turso> select * from generate_series(1,4,1);
┌───────┐
│ value │
├───────┤
│     1 │
├───────┤
│     2 │
├───────┤
│     3 │
├───────┤
│     4 │
└───────┘
Command stats:
----------------------------
total: 2 ms (this includes parsing/coloring of cli app)

query execution stats:
----------------------------
Execution: avg=2 us, total=14 us
I/O: No samples available

turso> select sum(value) from generate_series(1,10000000,1);
┌────────────────┐
│ sum (t1.c0)    │
├────────────────┤
│ 50000005000000 │
└────────────────┘
Command stats:
----------------------------
total: 236 ms (this includes parsing/coloring of cli app)

query execution stats:
----------------------------
Execution: avg=117 ms, total=235 ms
I/O: No samples available
turso> select sum(value) from generate_series(1,10000000,1) group by round(log(value));
┌────────────────┐
│ sum (t1.c0)    │
├────────────────┤
│              6 │
├────────────────┤
│            490 │
├────────────────┤
│          49590 │
├────────────────┤
│        4950617 │
├────────────────┤
│      494990550 │
├────────────────┤
│    49499924625 │
├────────────────┤
│  4949999577625 │
├────────────────┤
│ 45000005506497 │
└────────────────┘
Command stats:
----------------------------
total: 5.4540264 s (this includes parsing/coloring of cli app)

query execution stats:
----------------------------
Execution: avg=380 ms, total=3.4229425 s
I/O: avg=339 ns, total=24 us
turso> .exit
C:\d>duckdb140
DuckDB v1.4.0 (Andium) b8a06e4a22
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D .timer on

D select sum(value) from generate_series(1,10000000,1)t(value);
┌──────────────────┐
│   sum("value")   │
│      int128      │
├──────────────────┤
│  50000005000000  │
│ (50.00 trillion) │
└──────────────────┘
Run Time (s): real 0.025 user 0.015625 sys 0.000000
D select sum(value) from generate_series(1,10000000,1)t(value) group by round(log(value));
┌────────────────┐
│  sum("value")  │
│     int128     │
├────────────────┤
│      494990550 │
│            490 │
│          49590 │
│        4950617 │
│              6 │
│    49499924625 │
│ 45000005506497 │
│  4949999577625 │
└────────────────┘
Run Time (s): real 0.203 user 0.359375 sys 0.015625
C:\d>sqlite3
SQLite version 3.50.1 2025-06-06 14:52:32
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .timer on
sqlite> .header on
sqlite> select * from generate_series(1,4,1);
value
1
2
3
4
Run Time: real 0.002 user 0.000000 sys 0.000000
sqlite> select sum(value) from generate_series(1,10000000,1);
sum(value)
50000005000000
Run Time: real 0.162 user 0.156250 sys 0.015625
sqlite> select sum(value) from generate_series(1,10000000,1) group by round(log(value));
sum(value)
6
490
49590
4950617
494990550
49499924625
4949999577625
45000005506497
Run Time: real 2.578 user 2.234375 sys 0.328125

结论,duckdb最快,sqlite3次之,tursodb最慢

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值