Skip site navigation (1) Skip section navigation (2)

Re: Simple Join

From: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
To: Mitch Skinner <lists(at)arctur(dot)us>
Cc: Kevin Brown <blargity(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Simple Join
Date: 2005-12-15 19:29:17
Message-ID: 43A1C40D.8040006@paradise.net.nz (view raw or flat)
Thread:
Lists: pgsql-performance
Mitch Skinner wrote:
> I saw that; what I'm suggesting is that that you try creating a 3-column
> index on ordered_products using the paid, suspended_sub, and id columns.
> In that order, I think, although you could also try the reverse.  It may
> or may not help, but it's worth a shot--the fact that all of those
> columns are used together in the query suggests that you might do better
> with a three-column index on those. 
> 
> With all three columns indexed individually, you're apparently not
> getting the bitmap plan that Mark is hoping for.  I imagine this has to
> do with the lack of multi-column statistics in postgres, though you
> could also try raising the statistics target on the columns of interest.
> 
> Setting enable_seqscan to off, as others have suggested, is also a
> worthwhile experiment, just to see what you get.
> 
>

Right on. Some of these "coerced" plans may perform much better. If so, 
we can look at tweaking your runtime config: e.g.

effective_cache_size
random_page_cost
default_statistics_target

to see if said plans can be chosen "naturally".

cheers

Mark

In response to

Responses

pgsql-performance by date

Next:From: Anjan DaveDate: 2005-12-15 21:13:04
Subject: Re: SAN/NAS options
Previous:From: johannesbuehlerDate: 2005-12-15 14:44:23
Subject: effizient query with jdbc

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group