Re: New to PostgreSQL, performance considerations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx http://www.gregsmith.com Baltimore, MD


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux