Search Postgresql Archives

Re: [SQL] Difference between these two queries ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux