| From: | Matthew Wakeling <matthew(at)flymine(dot)org> |
|---|---|
| To: | Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> |
| Cc: | Dimitri <dimitrik(dot)fr(at)gmail(dot)com>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Aidan Van Dyk <aidan(at)highrise(dot)ca>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org> |
| Subject: | Re: Any better plan for this query?.. |
| Date: | 2009-05-12 15:00:00 |
| Message-ID: | alpine.DEB.2.00.0905121553370.2341@aragorn.flymine.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Simon Riggs | 2009-05-12 15:04:48 | Re: Any better plan for this query?.. |
| Previous Message | Stefan Kaltenbrunner | 2009-05-12 14:34:30 | Re: Any better plan for this query?.. |