Tom,

> event_date <= 'end-date' AND (event_date + duration) >= 'start-date'
> AND event_date >= 'start-date' - 'max-duration'

Great suggestion!   We're down to 160ms, from about 370ms with my subselect 
workaround.   Thanks!

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to