Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 6854D2E3048 for ; Fri, 30 Nov 2007 12:18:25 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 20277-01 for ; Fri, 30 Nov 2007 12:18:24 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 561592E0077 for ; Fri, 30 Nov 2007 12:18:24 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.1/8.14.1) with ESMTP id lAUGIM01057326 for ; Fri, 30 Nov 2007 12:18:22 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.1/8.14.1/Submit) id lAUG1CE1053644 for pgsql-performance@postgresql.org; Fri, 30 Nov 2007 12:01:12 -0400 (AST) (envelope-from news) From: cluster X-Newsgroups: pgsql.performance Subject: Re: Appending "LIMIT" to query drastically decreases performance Date: Fri, 30 Nov 2007 17:01:11 +0100 Organization: Hub.Org Networking Services Lines: 5 Message-ID: <475033C7.9010708@amossen.dk> References: <20071130092033.f09c1ac0.wmoran@collaborativefusion.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Bill Moran User-Agent: Thunderbird 2.0.0.6 (X11/20071022) In-Reply-To: <20071130092033.f09c1ac0.wmoran@collaborativefusion.com> To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/401 X-Sequence-Number: 27816 > Please post EXPLAIN ANALYZE output for the two queries. As I wrote in my first post, I pasted this together with the two queries at pastebin.com: http://pastebin.com/m3c0d1896