Database performance tests. The examples are inspired by the book SQL Performance explained.
DDL scripts by Markus Winand licensed under CC-BY-NC-ND 3.0 license
- docker and docker-compose
- SQL Client, e.g.
TODO: Common traits
- Start Postgres DB
cd postgres
docker-compose up
NOTE: This will create the database perftest
and all tables initially.
- Connect with your favorite DB client``
"server": "localhost",
"port": 5432,
"username": "perftest",
"password": "example",
"database": "perftest"
- Run sample queries, e.g.
postgres/sql/primary-keys.sql
The sample queries are creating execution plans, i.e. they use EXPLAIN
.
- Start SQL Server
cd mssql
docker-compose up
NOTE: This will create the database perftest
and all tables initially.
- Connect with your favorite DB client
"server": "localhost",
"port": 1433,
"username": "sa",
"password": "SuperStrong@Passw0rd",
"database": "perftest"
- Run sample queries, e.g.
mssql/sql/primary-keys.sql
The sample queries are creating execution plans, i.e. they use set SET STATISTICS PROFILE ON
and SET STATISTICS PROFILE OFF
afterwards. This generates two results: The actual result and another one for the execution plan.
Planned stuff goes into the Kanban Board.