Re: Re: [GENERAL] PostgreSQL vs. MySQL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: [GENERAL] PostgreSQL vs. MySQL
Date
Msg-id 19759.963197968@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] PostgreSQL vs. MySQL  (Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>)
Responses Re: Re: [GENERAL] PostgreSQL vs. MySQL  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Chris Bitmead <chrisb@nimrod.itg.telstra.com.au> writes:
> I'm wondering about the comments that postgres is slower in connection
> time, could this be related to that libpq always uses asynchronous
> sockets to connect? It always turns off blocking and then goes through a
> state machine to go through the various stages of connect, instead of
> just calling connect() and waiting for the kernel to do its thing.

I think you'd be wasting your time to "improve" that.  A couple of
kernel calls are not enough to explain the problem.  Moreover, we
had complaints about slow startup even back when libpq had never heard
of async anything.

I believe that the problem is on the backend side: there's an awful lot
of cache-initialization and so forth that happens each time a backend
is started.  It's quick enough to be hard to profile accurately,
however, so getting the info needed to speed it up is not so easy.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tim Perdue
Date:
Subject: Corruption Pt II
Next
From: The Hermit Hacker
Date:
Subject: [7.0.2] should this work? geo_distance() ...