louis's Blog

louis's Avatar Image
Software developer #Go #CommonLisp #JS #SQL. #LispWorks user. Soft spots for #Emacs #SmallWeb. Recently becoming #OpenBSD enthusiast. #LinuxMint as a daily driver. Recovering Apple addict.

Author of the Tuner app for Linux.

Other hobbies: #Running #FireFighter #StarTrek
← All posts

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;

Query in SurrealDB:

select count() from objects 
where score > 100
group all

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.

#surrealdb #postgresql #benchmark

To like or reply, open original post on Emacs.ch