Just gave SurrealDB 1.0.0, one of the new Rust kids on the block, a try. Goal: compare performance to PostgreSQL.
Both databases were setup on the same machine (x86_64, 8 cores).
Data: a table with 50.000 small rows (~60bytes). One column is a INT value between NULL and 250.
The raw file size on both databases was below 9 MBs.
Query in Postgres:
select count(*) from objects where score > 100;<br></br>
Query in SurrealDB:
select count() from objects <br></br>where score > 100<br></br>group all<br></br>
The count result will be 22.000.
Here are the results after a few repeated executions:
No index:
Postgres: 28ms
SurrealDB: 801ms
With index:
Postgres: 12ms
SurrealDB: 620ms
Time for creating the index:
Postgres: 50ms
SurrealDB: 8.140ms
I'm kind of disappointed about the result, given the small table size. I can't see how SurrealDB would scale with bigger setups and wonder about the hype around it.
I want to use #surrealdb, but I am unsure if it is safe enough to use in a hobby project. I know many people have already started using it, and I doubt anything I make will get heavy usage... but it’s such a powerful, different type of #database I really want to try leveraging it.