On Thu, Jan 5, 2017 at 10:51 AM, Flávio Henrique <yoshimit@xxxxxxxxx> wrote: > Replying your comment, I think they tunned the server: > effective_cache_size = 196GB > shared_buffers = 24GB (this shouldn't be higher?) Probably not, although it may be a good idea to try settings either side of that (say, 16GB and 32GB) and monitor performance compared to the current setting. > autovacuum_max_workers |3 If you ever see all workers busy at the same time for 30 minutes or more, you should probably consider raising that so that small, frequently updated tables are not neglected for too long. > autovacuum_vacuum_cost_limit |-1 That is going to default to vacuum_cost_limit, which is usually 200. If the server is actually big enough to merit "effective_cache_size = 196GB" then you should probably bump this setting to something like 2000. > autovacuum_work_mem |-1 That is going to default to maintenance_work_mem. On a big machine, you probably want that set to somewhere between 1GB and 2GB. Some other tuning to the cost parameters might be helpful, but there's not enough data on the thread to know what else to suggest. If you hit some other slow query, you might want to report it in the manner suggested here: https://wiki.postgresql.org/wiki/SlowQueryQuestions -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance