Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 4BF5E9FB79E for ; Tue, 5 Jun 2007 18:38:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 22044-10 for ; Tue, 5 Jun 2007 18:38:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by postgresql.org (Postfix) with ESMTP id 5C5BF9FB78E for ; Tue, 5 Jun 2007 18:38:50 -0300 (ADT) Received: from trofast.sesse.net ([129.241.93.32]) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1Hvgjn-0006be-Ov for pgsql-performance@postgresql.org; Tue, 05 Jun 2007 23:38:47 +0200 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1Hvgjn-0002W0-00 for ; Tue, 05 Jun 2007 23:38:47 +0200 Date: Tue, 5 Jun 2007 23:38:47 +0200 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Subject: Re: performance drop on 8.2.4, reverting to 8.1.4 Message-ID: <20070605213847.GA9547@uio.no> Mail-Followup-To: pgsql-performance@postgresql.org References: <20070518104646.GA13811@uio.no> <008201c7993c$76c88a10$653e10ac@ilgvaio> <20070518111455.GA13978@uio.no> <28604.1179503689@sss.pgh.pa.us> <357fa7590706051430h5db6760dx9d4a46c7a8a36205@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <357fa7590706051430h5db6760dx9d4a46c7a8a36205@mail.gmail.com> X-Operating-System: Linux 2.6.20.4 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/80 X-Sequence-Number: 25113 On Tue, Jun 05, 2007 at 05:30:14PM -0400, Steven Flatt wrote: > (A) LEFT JOIN (B) ON col WHERE B.col IS NULL > > These queries are much slower on 8.2 than on 8.1 for what looks like the > reason outlined above. I have rewritten a few key queries to be of the > equivalent form: > > (A) WHERE col NOT IN (SELECT col FROM (B)) At least those _can_ be rewritten into a sane form. I have an application with a large FULL OUTER JOIN, where _both_ sides can return NULLs. (It's basically a diff between a "current" and a "wanted" state.) It performs reasonably well under both 8.1 and 8.2, though. Fourteen-table join or so :-) /* Steinar */ -- Homepage: http://www.sesse.net/