Re: insert performance riddle
От | Michael Fuhr |
---|---|
Тема | Re: insert performance riddle |
Дата | |
Msg-id | 20050811193700.GA94258@winnie.fuhr.org обсуждение исходный текст |
Ответ на | Re: insert performance riddle ("Ed L." <pgsql@bluepolka.net>) |
Ответы |
Re: insert performance riddle
|
Список | pgsql-general |
On Thu, Aug 11, 2005 at 12:59:32PM -0600, Ed L. wrote: > > Michael, you seem to have nailed it. The local inserts (via > > Unix domain sockets?) that were running at 6 QPS ran at 6800 > > to 41000 QPS in a PL/pgSQL function. > > Here's another part of the riddle. The query durations for the > individual inserts as logged in the server log are ranging > 100ms-500ms per insert when connecting via DBI/DBD::Pg from > localhost. Inside pl/pgsql, they're clearly averaging faster > than 1ms per insert. I would have thought those times were > independent of the client communication layers...? Have you done any client-side tests that eliminate Perl? I'd suggest writing a little C program so you can measure libpq's performance without the extra layers of Perl and DBI/DBD::Pg. Test both local (Unix socket) and network (IPv4 or IPv6 socket) connections. A couple of months ago, Tom Lane noticed that benchmarks using DBD::Pg make PostgreSQL look worse than it deserves: http://archives.postgresql.org/pgsql-interfaces/2005-06/msg00003.php -- Michael Fuhr
В списке pgsql-general по дате отправления: