... btw, it occurs to me that at least as a stopgap, "set enable_nestloop = off" would be worth trying. The killer problem with rowcount-1 estimates is that they encourage the planner to use nestloops when it shouldn't. regards, tom lane
pgsql-performance by date:
Соглашаюсь с условиями обработки персональных данных