On Sun, Jun 06, 2010 at 10:15:52AM -0500, Little, Douglas wrote:
> They should generate equivalent results,
> But the difference is the constraint on bu.bid=5.
> In the 1st case it's being done after the join.
> In the 2nd case it is being done before the join.
In PG version 8.1 (?) and onwards, the query planner knows that they are
equivalent and will choose from the same types of plans. I.e. it's just
a syntax issue, do whichever you think is "prettier", the semantics are
the same.
--
Sam http://samason.me.uk/