Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 974C3B5DBC9 for ; Thu, 16 Jun 2011 18:50:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 91278-01 for ; Thu, 16 Jun 2011 21:50:12 +0000 (UTC) X-Greylist: delayed 00:38:59.895742 by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mail.postgresql.org (Postfix) with ESMTP id 4B93AB5DC06 for ; Thu, 16 Jun 2011 18:50:12 -0300 (ADT) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5GLBAIg002938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 16 Jun 2011 17:11:10 -0400 Received: from [10.11.11.193] (vpn-11-193.rdu.redhat.com [10.11.11.193]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5GLB9HJ014716 for ; Thu, 16 Jun 2011 17:11:09 -0400 Subject: Fetch Sizes and Blocks From: Ramesh Reddy Reply-To: rareddy@redhat.com To: pgsql-odbc@postgresql.org Content-Type: text/plain; charset="UTF-8" Organization: Red Hat Date: Thu, 16 Jun 2011 16:07:59 -0500 Message-ID: <1308258479.15712.29.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/12 X-Sequence-Number: 10670 Hi, I have been trying to read the code and understand how the results fetching works in ODBC. It looks like by default, all tuples are pre-fetched before they are returned to the client. Unless if you specify UseDeclareFetch=1 Fetch=1000 then it will use cursors to fetch 1000 rows at a time. My question is at network layer, does the driver fetch individual row at a time from server (for pre-fetch or cursor), or does it use some kind "bulk" fetch so that it minimizes the network traffic? I also did not see "Fetch" value coming across as connection string at server side, when it is set. PS: we wrote a PG wire protocol over http://teiid.org and want improve the performance. Thank you. Ramesh..