> Milan Sekanina <milan(at)sde(dot)cz> writes:
> > We are running an application that uses psqlodbc driver on Windows
> > connect to a server and for some reason the download of data from
> > server is very slow. We have created a very simple test application
> > inserts a larger amount of data into the database and uses a simple
> > "SELECT * from test" to download it back. The INSERT of 10MB takes
> > 4 seconds, while the SELECT takes almost 5 minutes (with basically
> > nothing else running on both the network and the two computers). If
> > run the PostgreSQL server on the local machine so that the network
> > not used, both actions are very fast.
> I seem to recall having seen similar reports not involving ODBC at
> Try searching the mailing-list archives, but I think the cases we
> involved getting rid of third-party add-ons to the Windows TCP stack.
IIRC there was a TCP related fix in the odbc driver related to
performance with large buffers. I'd suggest trying a newer odbc driver
dave page wrote ([odbc] 500 times slower)
> My collegue spent some time to dig the following case and it
> looks like
> Nagle algorithm and delayed ACKs related problem.
> In psqlodbc.h
> #define SOCK_BUFFER_SIZE 4096
> I changed that value to 8192 and driver works fine for me.
> I am not sure why this change helps.
Err, no neither am I. Why do you think it's got something to do with
The only thing that instantly rings bells for me is that the max size of
a text field is 8190 bytes at present (which really should be increased,
if not removed altogether), which won't fit in the default buffer. But
then, I wouldn't expect to see the performance drop you describe with a
4096 byte buffer, only one much smaller.
pgsql-performance by date
|Next:||From: Kevin Grittner||Date: 2005-06-30 14:47:19|
|Subject: Re: ODBC driver over network very slow|
|Previous:||From: Tom Lane||Date: 2005-06-30 13:48:19|
|Subject: Re: ODBC driver over network very slow |