Re: New to PostgreSQL, performance considerations

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: New to PostgreSQL, performance considerations
Дата
Msg-id Pine.GSO.4.64.0612121123280.7466@westnet.com
обсуждение исходный текст
Ответ на Re: New to PostgreSQL, performance considerations  (Alvaro Herrera <alvherre@commandprompt.com>)
Список 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@gregsmith.com http://www.gregsmith.com Baltimore, MD

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Low throughput of binary inserts from windows to linux
Следующее
От: David Boreham
Дата:
Сообщение: Re: Low throughput of binary inserts from windows to linux