[rt-devel] postgres query optimising (was: Re: [rt-users] Is this slow? It seems slow.)

Jesse Vincent jesse at bestpractical.com
Wed Jun 11 03:02:36 EDT 2003



On Wed, Jun 11, 2003 at 04:47:44PM +1000, Jamie Wilkinson wrote:
> [taken to -devel]
> 
> This one time, at band camp, Jamie Wilkinson wrote:
> >If that's true, could it be that a UNION query would be much better,
> >allowing the database to perform each of these queries separately and fast,
> >and then composing the results together?

I thought that postgres was supposed to be smarter about this sort of
thing after a vacuum analyze, such that the query optimizer would
actually optimize, rather than pessimize.  I suspect that trying to make
SearchBuilder magically guess when a UNION will be faster is going to be
a lose.  Are there indices that can be added to the postgres schema to
help it figure out what to do?



-- 
http://www.bestpractical.com/rt  -- Trouble Ticketing. Free.



More information about the Rt-devel mailing list