Re: Join query on 1M row table slow - Mailing list pgsql-general

From scott.marlowe
Subject Re: Join query on 1M row table slow
Date
Msg-id Pine.LNX.4.33.0402101604470.29982-100000@css120.ihs.com
Whole thread Raw
In response to Re: Join query on 1M row table slow  (CSN <cool_screen_name90001@yahoo.com>)
Responses Re: Join query on 1M row table slow
List pgsql-general
On Tue, 10 Feb 2004, CSN wrote:

> > So, can you get rid of the join / in on the other
> > table, or do you need it there?
>
> No - each product can fall under multiple categories,
> so I need the product_categories table (and the join
> on it).

Oh, ok.  then we might have as efficient a query as we're gonna get.

Oh, another thing is to make your select in the in() clause a select
distinct and see if that helps.  If you've got a whole bunch of duplicates
running around in it it's sometimes faster to distinct it.  Then again,
given all the work Tom's been putting in the query planner / optimization,
he may have already done something like that.


pgsql-general by date:

Previous
From: CSN
Date:
Subject: Re: Join query on 1M row table slow
Next
From: Martijn van Oosterhout
Date:
Subject: Temporary views