Skip to content

Rust PostgresSQL clients benchmark

License

Notifications You must be signed in to change notification settings

elephantry/benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust PostgresSQL clients benchmark

diesel · elephantry · libpq · postgres · sqlx

When I started developping elephantry I created this benchmark to check my code performence, maybe there results could interest other people.

Run

psql --command 'create database bench'
DATABASE_URL="postgres://$USER@localhost/bench" ./graph results/graph.png

Results

  • fetch first: fetch the first result of a 10 000 rows set;
  • fetch last: fetch the last result of a 10 000 rows set;
  • insert one: insert a new row;
  • insert many: insert 25 rows;
  • query all: fetch all results of a 10 000 rows table;
  • query one: fetch all results of a 1 row table.
  • one relation: fetch one user with their posts title
  • all relation: sfetch all users with all their posts title