Tuning PostgreSQL with pgbench
blog.codeship.com