Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1565F633866 for ; Fri, 3 Jul 2009 10:17:15 -0300 (ADT) 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 11190-10 for ; Fri, 3 Jul 2009 10:17:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id E50D9633700 for ; Fri, 3 Jul 2009 10:17:13 -0300 (ADT) Received: from 125-237-255-118.jetstream.xtra.co.nz ([125.237.255.118] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1MMidV-0008Lq-Kl; Sat, 04 Jul 2009 01:17:05 +1200 Message-ID: <4A4E04D1.5010905@opencloud.com> Date: Sat, 04 Jul 2009 01:17:05 +1200 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Robin Houston CC: pgsql-jdbc@postgresql.org Subject: Re: Cursor-based results: bafflingly slow References: <1b795e7b0907030546o7e44ebcdteb1168c9d6680380@mail.gmail.com> <1b795e7b0907030601x53ad69efk5412acc1a2595c61@mail.gmail.com> In-Reply-To: <1b795e7b0907030601x53ad69efk5412acc1a2595c61@mail.gmail.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200907/5 X-Sequence-Number: 19773 Robin Houston wrote: > For example, if I use "limit 100" to simulate the effect of fetching > the first 100 results: They're not really equivalent. A portal with a limited fetchsize is more like DECLARE CURSOR, not LIMIT. What does the plan look like if you plan it without the LIMIT? -O