Re: Libpq is very slow on windows but fast on linux. - Mailing list pgsql-general

From John R Pierce
Subject Re: Libpq is very slow on windows but fast on linux.
Date
Msg-id 4CD5ED74.7080205@hogranch.com
Whole thread Raw
In response to Libpq is very slow on windows but fast on linux.  (Rob Brown-Bayliss <r.brown.bayliss@gmail.com>)
Responses Re: Libpq is very slow on windows but fast on linux.  (Rob Brown-Bayliss <r.brown.bayliss@gmail.com>)
Re: Libpq is very slow on windows but fast on linux.  (Rob Brown-Bayliss <r.brown.bayliss@gmail.com>)
List pgsql-general
On 11/06/10 4:54 PM, Rob Brown-Bayliss wrote:
> Hi
>
> I have a problem with libpq on windows. Connecting to a db and running
> a "select * from some_table;" is very slow.
>
> The table has only 1800 rows, 7 columns. No blobs etc.
>
> The query is taking around 3500ms, in linux it takes around 800ms.
> (About 500ms is network time, the server is on the opposite side of
> the world from my location.)
>
> The hardware is identical (dual boot)
>
> Why does this so long in windows? I tested in pqsl, and pgadmin to
> rule out errors in the app code.
>
> Any advice or clues?  I need the app to work on both platforms.

to be clear, the database SERVER is the same in both cases?  only the
client varies?

when you say 500mS, thats the round trip ping time?

how about if you do something like, SELECT * FROM SOME_TABLE INTO
SOME_OTHER_TABLE;  which doesn't involve returning data?

I think I'd run a packet sniffer like Wireshark on both client
platforms, sniffing 5432/tcp and see if there's something unusual in the
timing of the packets, incorrect MTU or something, lost packets and
extra retries, or whatever.   Perhaps Windows isn't using a sufficiently
large TCP Recieve Window (RWIN) value, or something.






pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: Libpq is very slow on windows but fast on linux.
Next
From: Rob Brown-Bayliss
Date:
Subject: Re: Libpq is very slow on windows but fast on linux.