Postgres 11 chooses seq scan instead of index-only scan

2019-01-24 Thread twoflower
I restored a dump of our production DB (running on 9.6) to a Postgres 11 server and wanted to run some basic benchmarks to see if there isn't some unexpected performance drop. One issue I cannot resolve is the new server using a parallel seq scan instead of index-only scan for the following query:

Re: Postgres 11 chooses seq scan instead of index-only scan

2019-01-24 Thread twoflower
Yes! That was it, after running VACUUM TABLE history_translation, the query is now executed using index-only scan. I was under the impression that ANALYZE TABLE history_translation is enough, but it is not. Thank you very much. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general