X-Original-To: pgsql-hackers@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9FBAC47637A for ; Wed, 7 May 2003 01:08:03 -0400 (EDT) Received: from flake.decibel.org (unknown [66.143.173.58]) by postgresql.org (Postfix) with SMTP id DEA57476363 for ; Wed, 7 May 2003 01:08:01 -0400 (EDT) Received: (qmail 34648 invoked by uid 1001); 7 May 2003 05:08:01 -0000 Date: Wed, 7 May 2003 00:08:01 -0500 From: "Jim C. Nasby" To: Tom Lane Cc: Josh Berkus , pgsql-performance , pgsql-hackers@postgresql.org Subject: Re: [PERFORM] Hypothetical suggestions for planner, indexing improvement Message-ID: <20030507000801.E66185@flake.decibel.org> Reply-To: jim@nasby.net References: <200305051219.58955.josh@agliodbs.com> <22292.1052195133@sss.pgh.pa.us> <200305052133.33680.josh@agliodbs.com> <20030506080747.C66185@flake.decibel.org> <24779.1052228707@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <24779.1052228707@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Tue, May 06, 2003 at 09:45:07AM -0400 X-Operating-System: FreeBSD 4.8-RELEASE i386 X-Distributed: Join the Effort! http://www.distributed.net X-Spam-Status: No, hits=-40.0 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, QUOTE_TWICE_1,REFERENCES,REPLY_WITH_QUOTES, SIGNATURE_SHORT_SPARSE,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/139 X-Sequence-Number: 38646 On Tue, May 06, 2003 at 09:45:07AM -0400, Tom Lane wrote: > "Jim C. Nasby" writes: > > It would be nice to add support for multi-column IN.. > > WHERE (a, b, c) IN (SELECT a, b, c ...) > > RTFM... As someone pointed out, the documentation says you can't. In this case the docs are wrong (I've added a note). > > BTW, does postgresql handle IN and EXISTS differently? > > Yes. > > > Theoretically if the optimizer was good enough you could transform one > > to the other and not worry about it. > > No. They have different responses to NULLs in the subselect result. They appear to operate the same... what's different? -- Jim C. Nasby (aka Decibel!) jim@nasby.net Member: Triangle Fraternity, Sports Car Club of America Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"