Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id DC3B59FB53A for ; Thu, 1 Mar 2007 22:15:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 80095-05 for ; Thu, 1 Mar 2007 22:15:31 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 46AA69FB308 for ; Thu, 1 Mar 2007 22:15:31 -0400 (AST) Received: (qmail 17458 invoked from network); 2 Mar 2007 11:15:28 +0900 Received: from unknown (HELO ?127.0.0.1?) (100.0.32.170) by sd2.tpf-fw-c.co.jp with SMTP; 2 Mar 2007 11:15:28 +0900 Message-ID: <45E788BA.6090904@tpf.co.jp> Date: Fri, 02 Mar 2007 11:15:22 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Patrick Hatcher CC: pgsql-odbc@postgresql.org Subject: Re: Driver seems to hang fetching data References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.051 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200703/10 X-Sequence-Number: 8688 Patrick Hatcher wrote: > Sorry. I didn't realize there was a setting besides the Global one. Here > you go: > (See attached file: psqlodbc_5360.log) Thanks. AFAIC the merits to use DECLARE/FETCH mode are 1. You can suppress the memory consumption at some level. 2. you can get first rows fast in some cases. Looking at the log you sent me, probably the query in question is declare "SQL_CUR02D9FB78" cursor for select amc_Week_id, lpad(zl_divn_nbr::text,2,0) as zl_divn_nbr, lpad(dept::text,4,0) as dept, ............. As for the merit 1), though the query returns 156673 records , you can get them successfully even when your machine has pretty small size of memory. As for the merit 2), you don't get first rows first for the query unfortunately. According to the Commlog declare "SQL_ ... 0.282sec fetch the 1st 1000 rows 431.453sec fetch the rest of the rows 29.89sec Total throughput 461.625sec may be longer than that of the same query without using DECLARE/FETCH mode. regards, Hiroshi Inoue