> Maybe odd, but simpler to optimize this way.
> 
> Your idea would be also a very good optimization, there was 
> already a discussion about that here:
> http://archives.postgresql.org/pgsql-performance/2006-01/msg00
> 151.php, but that time Tom refused it because it was too 
> expensive and rare. Maybe now he has a different opinion.
> However, left join optimization is lot simpler and cheaper, 
> and can be useful not only for O/R mappers, but for efficient 
> vertical partitioning as Simon mentioned.

For the views use case there is a simple solution without the expensive 
optimization:
If you have a PK FK relationship simply rewrite the view to use a left join 
instead
of a join. Since there is always one row on the outer (PK) side it makes no 
difference to the result set.
And then the left join optimization can be used.

Andreas

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to