X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6AC04329E23 for ; Tue, 21 Sep 2004 06:19:38 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 51749-02 for ; Tue, 21 Sep 2004 05:19:34 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 09960329E15 for ; Tue, 21 Sep 2004 06:19:34 +0100 (BST) 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 i8L5JXqx025939; Tue, 21 Sep 2004 01:19:34 -0400 (EDT) To: "Dean Gibson (DB Administrator)" Cc: pgsql-sql@postgresql.org Subject: Re: JOIN performance In-reply-to: <5.1.0.14.2.20040920213442.00ae4450@imaps.mailpen.net> References: <5.1.0.14.2.20040920182022.00adf5e8@imaps.mailpen.net> <5.1.0.14.2.20040920164348.00a99868@imaps.mailpen.net> <5.1.0.14.2.20040920121606.00a89c68@imaps.mailpen.net> <414F02FF.8000603@numerixtechnology.de> <414F02FF.8000603@numerixtechnology.de> <5.1.0.14.2.20040920121606.00a89c68@imaps.mailpen.net> <5.1.0.14.2.20040920164348.00a99868@imaps.mailpen.net> <5.1.0.14.2.20040920182022.00adf5e8@imaps.mailpen.net> <5.1.0.14.2.20040920213442.00ae4450@imaps.mailpen.net> Comments: In-reply-to "Dean Gibson (DB Administrator)" message dated "Mon, 20 Sep 2004 21:41:40 -0700" Date: Tue, 21 Sep 2004 01:19:33 -0400 Message-ID: <25938.1095743973@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/182 X-Sequence-Number: 19028 "Dean Gibson (DB Administrator)" writes: > It turns out that even when I removed the CASE statement from the VIEW, the > performance problem remained. I had to remove the conditional as well from > the VIEW. > cancel_date < expire_date AS canceled, Yuck :-( > Do you know why? I'm running 7.3.4, by the way. 7.3 is even stupider than 7.4, is why ... In 7.3 only a view whose targetlist consists of simple column references can be pulled up into the nullable side of an outer join. regards, tom lane