Hi all,

We have recently upgraded our project from Postgres v9.1 to v9.4 and it has a large DB. The whole system performance has degraded alarmingly after the upgrade. Simple operations that were taking only a few seconds in Postgres 9.1 are now taking minutes of time. The problem is not specific to one query or some kind of queries. It's been generic and overall system has become very slow.

We tried running 'VACUUM ANALYZE' on the database and that seemed to be helful too. But the improvement after this is no where close to the performance we had in 9.1.

We tried changing some of the configuration parameters in the postgres.conf file as follows(our Postgres server has an 8 GB RAM)-

shared_buffers = 2000MB
maintenance_work_mem = 1000MB
default_statistics_target = 1000
effective_cache_size = 4000MB

and these made absolutely no difference to the query execution time.

The strangest part of the problem is when I EXPLAIN ANALYZE the same query multiple times in the same Postgres server, it gives me different values at different times ranging from 45ms to 181 ms.

We are absolutely clueless on how to proceed. Any help would be greatly appreciated.
Thanks in advance.