Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id C3F1F633816 for ; Wed, 13 Jan 2010 01:36:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 77045-01 for ; Wed, 13 Jan 2010 05:35:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by mail.postgresql.org (Postfix) with SMTP id 74C5D6335D0 for ; Wed, 13 Jan 2010 01:35:52 -0400 (AST) Received: (qmail 29549 invoked by uid 512); 13 Jan 2010 05:35:49 -0000 Received: from unknown (HELO ?127.0.0.1?) (100.0.32.252) by sd2.tpf-fw-c.co.jp with SMTP; 13 Jan 2010 05:35:49 -0000 Message-ID: <4B4D5BA6.2060907@tpf.co.jp> Date: Wed, 13 Jan 2010 14:35:34 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Laurent Chouinard CC: pgsql-odbc@postgresql.org Subject: Re: C# w/ ODBC, 2.1 million list select gives empty DataSet References: <4B4BB581.3050302@sem.ca> In-Reply-To: <4B4BB581.3050302@sem.ca> 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=3.504 tagged_above=-10 required=5 tests=BAYES_50=0.001, FH_DATE_PAST_20XX=3.188, SARE_MILLIONSOF=0.315 X-Spam-Level: *** X-Archive-Number: 201001/7 X-Sequence-Number: 10170 Laurent Chouinard wrote: > Hi everyone, > > I've been using the ODBC driver for Windows along with my C# (Framework > 2.0) for a few years now and it's been working very nicely. > > Until now. > > One of my customer's database has grown to considerable size over time, > and in particular, one report he attemps to do in my software gives an > empty report. > > Upon investigation, I determined that the SELECT I send to the > postgresql gets processed properly and it probably hands over about 2.1 > million rows as the response. After that, I use the "Fill" method as > instructed in the "HOW TO" section in the ODBC documentation to fill the > data into a DataSet object. > > After considerable amount of work (almost the same as when I do that > same query in PgAdmin III, about 110 seconds), the DataSet gets > initialized empty, with zero tables in it. No errors, no exceptions. > Everything moves along as if nothing happened. > > I just upgraded to the latest ODBC drivers (dated december 2009) and > it's not changing my issue. Hmmm, 2.1 millions of rows are too many. Possibly "Out of memory while reading tuples" error occurs but the driver forgets to handle it in some cases. Please try the drivers on testing for 8.4.0201 at http://www.geocities.jp/inocchichichi/psqlodbc/index.html . You may be able to improve the memory usage by checking the "Use Declare/Fetch" option. regards, Hiroshi Inoue