Re: Performance Optimization for Dummies 2 - the SQL

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

 



On Thu, Oct 05, 2006 at 09:30:45AM -0400, Merlin Moncure wrote:
> I personally only use explicit joins when doing outer joins and even
> them push them out as far as possible.

I used to be like that too, until I actually started using join syntax.
I now find it's *way* easier to identify what the join conditions are,
and to seperate them from the rest of the where clause. It also makes it
pretty much impossible to mess up a join clause and get a cartesian
product.

If you are going to put the join clauses in the WHERE clause, at least
put a space between the join stuff and the rest of the WHERE clause.

In any case, this is nothing but a matter of taste in this case, unless
you set join_collapse_limit to less than 3 (or maybe 4).
-- 
Jim Nasby                                            jim@xxxxxxxxx
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux