Peter, > I'm sure the big brains have a better suggestion, but in the mean time > could you do something as simple as: > > SELECT * > FROM (select * from events where event_date BETWEEN 'date1' AND 'date2') e > LEFT OUTER JOIN cases ON e.case_id = cases.case_id;
Thanks, but that doens't work; the planner will collapse the subquery into the main query, which most of the time is the right thing to do. -- -Josh Berkus Aglio Database Solutions San Francisco ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match