Re: New to PostgreSQL, performance considerations

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: New to PostgreSQL, performance considerations
Date: 2006-12-12 16:36:01
Message-ID: Pine.GSO.4.64.0612121123280.7466@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, 12 Dec 2006, Alvaro Herrera wrote:

> While skimming over the pgbench source it has looked to me like it's
> necessary to pass the -s switch (scale factor) to both the
> initialization (-i) and the subsequent (non -i) runs.

For non-custom runs, it's computed based on the number of branches.
Around line 1415 you should find:

res = PQexec(con, "select count(*) from branches");
...
scale = atoi(PQgetvalue(res, 0, 0));

So it shouldn't be required during the run, just the initialization.

However, note that there were some recent bug fixes to the scaling
implementation, and I would recommend using the version that comes with
8.2 (pgbench 1.58 2006/10/21). It may compile fine even if you copy that
pgbench.c into an older version's contrib directory; it's certainly a
drop-in replacement (and improvement) for the pgbench 1.45 that comes with
current Postgres 8.1 versions.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message David Boreham 2006-12-12 16:56:02 Re: Low throughput of binary inserts from windows to linux
Previous Message Tom Lane 2006-12-12 16:33:20 Re: Low throughput of binary inserts from windows to linux