Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5EA849FBD0C for ; Wed, 27 Jun 2007 11:46:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 18152-06 for ; Wed, 27 Jun 2007 11:46:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sd.tpf.co.jp (mail.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 0FF9B9FBE0E for ; Wed, 27 Jun 2007 11:46:29 -0300 (ADT) Received: (qmail 23246 invoked from network); 27 Jun 2007 23:46:27 +0900 X-Authentication: inoue was authenticated by mail.tpf.co.jp at 27 Jun 2007 23:46:27 +0900 Received: from unknown (HELO ?192.168.11.3?) (219.61.40.6) by mail.tpf.co.jp with SMTP; 27 Jun 2007 23:46:27 +0900 Message-ID: <4682783C.5000705@tpf.co.jp> Date: Wed, 27 Jun 2007 23:46:20 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Rainer Bauer CC: pgsql-odbc@postgresql.org Subject: Re: Why is UseDeclareFetch so slow? References: <4681B973.6080101@tpf.co.jp> <6ft483p1sfcupaid9hb778vsj3cg3bnlnh@4ax.com> In-Reply-To: <6ft483p1sfcupaid9hb778vsj3cg3bnlnh@4ax.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/56 X-Sequence-Number: 9045 Rainer Bauer wrote: > Hello Hiroshi, > >>> So my questions are >>> 1) Is there any chance the driver itself could be enhanced like Dimitri >>> suggested here: >>> ? >> You can specify the fetch count in UseDeclareFetch mode using the >> Cache Size option or FETCH=N connection string. > > Yes, but the real question is why is the query 4 times slower when > UseDeclareFetch is enabled (FETCH was set to 100)? > > I would have expected that the ODBC driver is fetching 100 rows in advance and > thus the query should execute in less than a second instead of 30 seconds. Could you send me directly the Mylog output ? regards, HIroshi Inoue