manedev79 / db-performance-tests

Database performance tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

db-performance-tests

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

Prerequisites

Setup

TODO: Common traits

Postgres

  1. Start Postgres DB
cd postgres
docker-compose up

NOTE: This will create the database perftest and all tables initially.

  1. Connect with your favorite DB client``
"server": "localhost",
"port": 5432,
"username": "perftest",
"password": "example",
"database": "perftest"
  1. Run sample queries, e.g. postgres/sql/primary-keys.sql

The sample queries are creating execution plans, i.e. they use EXPLAIN.

SQL Server

  1. Start SQL Server
cd mssql
docker-compose up

NOTE: This will create the database perftest and all tables initially.

  1. Connect with your favorite DB client
"server": "localhost",
"port": 1433,
"username": "sa",
"password": "SuperStrong@Passw0rd",
"database": "perftest"
  1. 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.

Project Board

Planned stuff goes into the Kanban Board.

About

Database performance tests

License:MIT License


Languages

Language:TSQL 64.8%Language:PLpgSQL 21.6%Language:Shell 10.0%Language:Dockerfile 3.6%