Re: [repost] partial index / funxtional idx or bad sql?

Jim Nasby <jim@nasby.net>

From: "Jim C. Nasby" <jim@nasby.net>
To: csajl <csajl@yahoo.com>
Cc: Stephan Szabo <sszabo@megazone23.bigpanda.com>, josh@agliodbs.com, pgsql-performance@postgresql.org
Date: 2003-05-13T10:58:17Z
Lists: pgsql-performance
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?"