This is a framework implementation using the mORMot2 FreePascal/Delphi framework. It builds using FreePascal compiler and developed using Lazarus IDE
The tests were run with:
For debugging purpose run Postges using Docker
sudo docker run --name postgres -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 postgres:12
add tfb-database
into hosts
echo '127.0.0.1 tfb-database' | sudo tee -a /etc/hosts
Database can be initialized using scripts from TFBDatabases repo
git clone https://github.com/TechEmpower/TFBDatabases.git
cd TFBDatabases
psql postgres://postgres:postgres@tfb-database:5432 < create-postgres-database.sql
psql postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world < create-postgres.sql
http://localhost:8080/plaintext
mORMot
HTTP server does not support HTTP pipelining,
so numbers is not impressive here.
http://localhost:8080/query?queries=
http://localhost:8080/cached_query?queries=
http://localhost:8080/update?queries=
Batch update SQL statement in case of Postgres is generated by ORM as such:
update table set field = v.field from (SELECT unnest(?), unnest(?)) as v(id, field) where t.id = v.id
Nested select is a reason of warning for tfb --verify