"Verena Ruff" <lists(at)triosolutions(dot)at> writes:
> The WHERE clause is created dynamically and may contain fields of each
> table which is part of the join, so I can't just change the order of the
> tables in my code to get the best result. Is there a way to make those
> optimizations (re-ordering of tables) automatically?
CVS HEAD (PG 8.2 to be) is reasonably bright about re-ordering left
joins, but no current release tries to do it at all...
regards, tom lane