Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9574F477645 for ; Tue, 28 Jan 2003 18:47:01 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 68B054775C5 for ; Tue, 28 Jan 2003 17:40:58 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h0SMf05u004510; Tue, 28 Jan 2003 17:41:00 -0500 (EST) To: Andreas Pflug Cc: pgsql-performance@postgresql.org Subject: Re: inefficient query plan with left joined view In-reply-to: <3E36DAA2.4010003@web.de> References: <3E36B4F2.1020506@web.de> <22633.1043778607@sss.pgh.pa.us> <3E36DAA2.4010003@web.de> Comments: In-reply-to Andreas Pflug message dated "Tue, 28 Jan 2003 20:31:46 +0100" Date: Tue, 28 Jan 2003 17:41:00 -0500 Message-ID: <4509.1043793660@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/374 X-Sequence-Number: 1021 Andreas Pflug writes: > As the example shows even > columns that are never used will be taken into account when checking > has_nullable_targetlist. It's not really practical to do otherwise, as the code that needs to check this doesn't have access to a list of the columns actually used. Even if we kluged things up enough to make it possible to find that out, that would merely mean that *some* of your queries wouldn't have a problem. What about improving the intelligence of the nullability check --- or do you have non-strict expressions in there? regards, tom lane