X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B90A2529D1 for ; Thu, 30 Jun 2005 11:47:37 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02813-05 for ; Thu, 30 Jun 2005 14:47:25 +0000 (GMT) Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.91]) by svr1.postgresql.org (Postfix) with ESMTP id 2315652956 for ; Thu, 30 Jun 2005 11:47:21 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Thu, 30 Jun 2005 09:47:25 -0500 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.2 Date: Thu, 30 Jun 2005 09:47:19 -0500 From: "Kevin Grittner" To: , Cc: , Subject: Re: ODBC driver over network very slow Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.02 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/596 X-Sequence-Number: 13233 I was hesitant to jump in on this because I am new to PostgreSQL and haven't seen this problem with _it_, but I have seen this with the Sybase database products. You can configure Sybase to disable the Nagle algorithm. If you don't, any query which returns rows too big to fit in their network buffer will be painfully slow. Increasing the buffer size can help with an individual query, but it just reduces the scope of the problem. What you really want to do is make sure that TCP_NODELAY is set for the connection, to disable the Nagle algorithm; it just doesn't seem to be appropriate for returning query results. How this issue comes into play in PostgreSQL is beyond my ken, but hopefully this observation is helpful to someone. -Kevin >>> "Merlin Moncure" 06/30/05 9:10 AM >>> > 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?