Skip to content

loderunner/postgresql-index-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postgresql-index-benchmark

A benchmark runner for PostgreSQL relations with and without indexes

Prerequisites

Setup

Clone the repository

git clone https://github.com/loderunner/postgresql-index-benchmark.git

Install dependencies

npm install

Environment

Configure your environment by setting your database URL:

.env file

Create a .env file at the root of your repository, and set the DATABASE_URL variable to a PostgreSQL connection URL:

DATABASE_URL=postgresql://postgres:password@localhost:5432/postgresql-index-benchmark?connection_limit=20&pool_timeout=0

Shell variables

Configure your environment variable directly in your shell:

export DATABASE_URL="postgresql://postgres:password@localhost:5432/postgresql-index-benchmark?connection_limit=20&pool_timeout=0"

Migrate database and generate client

Migrate the database to match the benchmark schema, and generate the Prisma client:

npx prisma migrate dev

Run

Run the benchmark:

node .

About

A benchmark runner for PostgreSQL relations with and without indexes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published