Skip site navigation (1) Skip section navigation (2)

Re: ODBC driver over network very slow

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-performance(at)postgresql(dot)org>,"Milan Sekanina" <milan(at)sde(dot)cz>
Subject: Re: ODBC driver over network very slow
Date: 2005-06-30 14:10:25
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3415C2C49@Herge.rcsinc.local (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
> Milan Sekanina <milan(at)sde(dot)cz> writes:
> > We are running an application that uses psqlodbc driver on Windows
XP to
> > 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
Nagle/delayed ACKs?

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 GrittnerDate: 2005-06-30 14:47:19
Subject: Re: ODBC driver over network very slow
Previous:From: Tom LaneDate: 2005-06-30 13:48:19
Subject: Re: ODBC driver over network very slow

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group