Re: Forcing filter/join order?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Peter Darley" <pdarley(at)kinesis-cem(dot)com>, "pgsql-performance" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Forcing filter/join order?
Date: 2004-02-19 00:31:54
Message-ID: 200402181631.54175.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Peter Darley 2004-02-19 00:40:33 Re: Forcing filter/join order?
Previous Message Josh Berkus 2004-02-19 00:30:43 Re: Forcing filter/join order?