Just guessing here, but what values are you using for join_collapse_limit and from_collapse_limit, and what happens if you make them much bigger (like 100)? ...Robert
pgsql-performance by date:
Соглашаюсь с условиями обработки персональных данных