Re: Any better plan for this query?..

Поиск
Список
Период
Сортировка
От Matthew Wakeling
Тема Re: Any better plan for this query?..
Дата
Msg-id alpine.DEB.2.00.0905121553370.2341@aragorn.flymine.org
обсуждение исходный текст
Ответ на Re: Any better plan for this query?..  (Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>)
Ответы Re: Any better plan for this query?..
Список pgsql-performance
On Tue, 12 May 2009, Stefan Kaltenbrunner wrote:
> But what I get from your answer is that you are basically doing one
> connect/disconnect per client and the testcase you are talking about has 256
> clients?

Correct me if I'm wrong, but won't connect operations be all handled by a
single thread - the parent postmaster? There's your scalability problem
right there. Also, spawning a new backend process is an awful lot of
overhead to run just one query.

As far as I can see, it's quite understandable for MySQL to perform better
than PostgreSQL in these circumstances, as it has a smaller simpler
backend to start up each time. If you really want to get a decent
performance out of Postgres, then use long-lived connections (which most
real-world use cases will do) and prepare your queries in advance with
parameters.

Matthew

--
 import oz.wizards.Magic;
   if (Magic.guessRight())...           -- Computer Science Lecturer

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Any better plan for this query?..
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Any better plan for this query?..