X-Original-To: pgsql-performance@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4A5654762CF for ; Tue, 13 May 2003 06:58:19 -0400 (EDT) Received: from flake.decibel.org (unknown [66.143.173.58]) by postgresql.org (Postfix) with SMTP id 31694474E42 for ; Tue, 13 May 2003 06:58:15 -0400 (EDT) Received: (qmail 83013 invoked by uid 1001); 13 May 2003 10:58:17 -0000 Date: Tue, 13 May 2003 05:58:17 -0500 From: "Jim C. Nasby" To: csajl Cc: Stephan Szabo , josh@agliodbs.com, pgsql-performance@postgresql.org Subject: Re: [repost] partial index / funxtional idx or bad sql? Message-ID: <20030513055817.N66185@flake.decibel.org> Reply-To: jim@nasby.net References: <20030512204533.I20042-100000@megazone23.bigpanda.com> <20030513040338.3925.qmail@web40305.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030513040338.3925.qmail@web40305.mail.yahoo.com>; from csajl@yahoo.com on Mon, May 12, 2003 at 09:03:38PM -0700 X-Operating-System: FreeBSD 4.8-RELEASE i386 X-Distributed: Join the Effort! http://www.distributed.net X-Spam-Status: No, hits=-39.4 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, 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/145 X-Sequence-Number: 1924 On Mon, May 12, 2003 at 09:03:38PM -0700, csajl wrote: > > wow. > > that did it. so much for my knowing SQL... > > > > How about something like: > > > > select c.class_id, c.areacode, c.title from > > classifieds c, > > (select distinct areacode from cm_areacode where site_id='10') a > > where c.class_cat_id='1' and c.areacode=a.areacode; > > Wow, I'll have to keep that in mind. Shouldn't the optimizer be able to handle that? Could this get added to the TODO? -- 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?"