Ranier,I tried to VACCUM ANALYZE the tables involved multiple times and also tried the statistics approach as well
pgsql-performance by date:
Соглашаюсь с условиями обработки персональных данных