Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A4C4C633779 for ; Tue, 15 Jun 2010 08:10:23 -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 57362-09 for ; Tue, 15 Jun 2010 11:10:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail2.hosting.digiweb.ie (mail2.hosting.digiweb.ie [89.234.64.43]) by mail.postgresql.org (Postfix) with ESMTP id E84C9632EC0 for ; Tue, 15 Jun 2010 08:10:12 -0300 (ADT) Received: (qmail 19275 invoked by uid 399); 15 Jun 2010 10:15:31 -0000 Received: from unknown (HELO ?127.0.0.1?) (music@galwaycathedral.ie@86.43.79.16) by mail2.hosting.digiweb.ie with ESMTPAM; 15 Jun 2010 10:15:31 -0000 X-Originating-IP: 86.43.79.16 Message-ID: <4C1752C3.9080405@iol.ie> Date: Tue, 15 Jun 2010 11:15:31 +0100 From: Raymond O'Donnell Reply-To: rod@iol.ie User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: AI Rumman CC: Thom Brown , vinny , pgsql-php@postgresql.org Subject: Re: large resultset References: <8f468dc246fb6075f2a1f46b09f71a6d@xs4all.nl> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 100615-0, 15/06/2010), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-10 required=5 tests=BAYES_20=-0.001 X-Spam-Level: X-Archive-Number: 201006/7 X-Sequence-Number: 4146 On 15/06/2010 11:01, AI Rumman wrote: > No. I need to send 2 million records. I want to know what is the best > possible way to send these records? > HOw should I write the plpgsql procedure to send record ony by one to > improve the response time to the users? Are you really going to display all 2 million at once? Surely you'd be better off displaying smaller pages at a time. In any case, you haven't been clear about what you are trying to do - if you explain in more detail, we'll be better able to help. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie