Re: Forcing filter/join order? - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Forcing filter/join order?
Date
Msg-id 200402181631.54175.josh@agliodbs.com
Whole thread Raw
In response to Re: Forcing filter/join order?  ("Peter Darley" <pdarley@kinesis-cem.com>)
List pgsql-performance
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


pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Forcing filter/join order?
Next
From: Stephan Szabo
Date:
Subject: Re: Forcing filter/join order?