From: Josh Berkus <josh@agliodbs.com>
To: Peter Darley <pdarley@kinesis-cem.com>
To: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Forcing filter/join order?
Date: Wed, 18 Feb 2004 16:31:54 -0800
Message-ID: <200402181631.54175.josh@agliodbs.com> (raw)
In-Reply-To: <PDEOIIFFBIAABMGNJAGPIENFCNAA.pdarley@kinesis-cem.com>
References: <PDEOIIFFBIAABMGNJAGPIENFCNAA.pdarley@kinesis-cem.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: josh@agliodbs.com, pdarley@kinesis-cem.com
Subject: Re: Forcing filter/join order?
In-Reply-To: <200402181631.54175.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox