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

Re: Forcing filter/join order?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "pgsql-performance" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Forcing filter/join order?
Date: 2004-02-19 00:30:43
Message-ID: 200402181630.43503.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-performance
Folks,

Hmmm posted too soon.  Figured out the problem:

The planner can't, or doesn't want to, use an index on (event_date, 
(event_date + duration)) where the first column is an ascending sort and the 
second a descending sort.    So I've coded a workaround that's quite 
inelegant but does get the correct results in 0.3 seconds (as opposed to the 
2.2 seconds taken by the example plan).

Is this the sort of thing which is ever likely to get fixed, or just a 
fundamental limitation of index algorithms?   Would using a non B-Tree index 
allow me to work around this?

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco


In response to

Responses

pgsql-performance by date

Next:From: Josh BerkusDate: 2004-02-19 00:31:54
Subject: Re: Forcing filter/join order?
Previous:From: Josh BerkusDate: 2004-02-19 00:10:31
Subject: Forcing filter/join order?

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