X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id E8FB49DD686 for ; Thu, 1 Dec 2005 12:26:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53036-10 for ; Thu, 1 Dec 2005 12:26:06 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 72A169DD683 for ; Thu, 1 Dec 2005 12:26:06 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jB1GQ4VB011569; Thu, 1 Dec 2005 11:26:04 -0500 (EST) To: "Markus Wollny" cc: pgsql-performance@postgresql.org Subject: Re: Queries taking ages in PG 8.1, have been much faster in PG<=8.0 In-reply-to: <28011CD60FB1724DBA4442E38277F6264A626A@hermes.computec.de> References: <28011CD60FB1724DBA4442E38277F6264A626A@hermes.computec.de> Comments: In-reply-to "Markus Wollny" message dated "Thu, 01 Dec 2005 16:49:14 +0100" Date: Thu, 01 Dec 2005 11:26:04 -0500 Message-ID: <11568.1133454364@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/22 X-Sequence-Number: 15843 "Markus Wollny" writes: > My current problem is that rewriting hundreds of queries, some of them > quite a bit more complex than this one, but all of them using the same > general scheme, would take quite a lot of time - and I'm expected to > hand over the survey results ASAP. So I will obviously have to do a > rewrite if there's just no other way, but I wondered if there might be > some other option that would allow me to point the planner in the right > direction so it would behave the same as in the previous versions, > namely 8.0? It looks like "set enable_nestloop = 0" might be a workable hack for the immediate need. Once you're not under deadline, I'd like to investigate more closely to find out why 8.1 does worse than 8.0 here. regards, tom lane