Skip to content

Instantly share code, notes, and snippets.

@rsyuzyov
Created July 22, 2018 06:16
Show Gist options
  • Select an option

  • Save rsyuzyov/57cfcd08928ca67684de01e01e61debb to your computer and use it in GitHub Desktop.

Select an option

Save rsyuzyov/57cfcd08928ca67684de01e01e61debb to your computer and use it in GitHub Desktop.
pgbench
#!/bin/sh
$ git clone https://github.com/postgrespro/pg_oltp_bench.git
$ cd pg_oltp_bench
$ make USE_PGXS=1
$ sudo make USE_PGXS=1 install
$ psql DB -f oltp_init.sql
$ psql DB -c "CREATE EXTENSION pg_oltp_bench;"
$ pgbench -c 100 -j 100 -M prepared -f oltp_ro.sql -T 300 -P 1 DB
$ pgbench -c 100 -j 100 -M prepared -f oltp_rw.sql -T 300 -P 1 DB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment