PostgreSQL Performance Tuning and Optimization

Some of the most critical aspects of tuning PostgreSQL for performance are hardware updates, configuration, vacuuming, query performance, and indexing of queries. This page consists of tips, issues, benchmarks, and tools to performance optimize PostgreSQL using different techniques.

How to Tune PostgreSQL GUC Parameters

Tushar Ahuja · May 5, 2020

This article discusses GUC parameters that can be used for PostgreSQL tuning and how to configure them for improved performance.

What is Parallel Vacuum in PostgreSQL 13

Dilip Kumar · April 17, 2020

In PostgreSQL, we already support parallelism of a SQL query which leverages multiple cores to execute the query faster.  Vacuum is one of the most critical utility operations which helps in controlling bloat, one of the major problems for PostgreSQL DBAs.  So, vacuum needs to run really fast to reduce the bloat as early as possible. In PG13, parallel vacuum is introduced which allows for parallel vacuuming of multiple indexes corresponding to a single table.

PostgreSQL query tuning checklist

Tushar Ahuja · April 6, 2020

This article offers a checklist of tools available for improving PostgreSQL query performance.

How to tune PostgreSQL for memory

Tushar Ahuja · April 6, 2020

This article looks at parameters that can be used to help manage memory in PostgreSQL. Recommended settings for each parameter are also provided.

Comprehensive guide on how to tune database parameters and configuration in PostgreSQL

Swapnil Suryawanshi · December 17, 2019

This article discusses parameters that can be used to configure performance in PostgreSQL. After introducing ways of measuring database speed, it reviews the parameters and ways to optimize performance with them.

DO or UNDO - There is no PostgreSQL VACUUM

Robert Haas · January 30, 2018

What if PostgreSQL didn’t need VACUUM at all? This seems hard to imagine. After all, PostgreSQL uses multi-version concurrency control (MVCC), and if...

The State of VACUUM

Robert Haas · January 9, 2018

In a recent blog post, I talked about why every system that implements MVCC needs some scheme for removing old row versions, and how VACUUM meets that...

History of improvements in VACUUM in PostgreSQL

Robert M. Haas · January 5, 2018

In a recent blog post, I talked about why every system that implements MVCC needs some scheme for removing old row versions, and how VACUUM meets that need for PostgreSQL. In this post, I’d like to examine the history of VACUUM improvements in recent years, the state of VACUUM as it exists in PostgreSQL today, and how it might be improved in the future.

MVCC and VACUUM in PostgreSQL

Robert Haas · December 19, 2017

Experienced PostgreSQL users and developers rattle off the terms “MVCC” and “VACUUM” as if everyone should know what they are and how they work, but...

Why we need VACUUM to implement MVCC In PostgreSQL

Robert M. Haas · December 18, 2017

Experienced PostgreSQL users and developers rattle off the terms “MVCC” and “VACUUM” as if everyone should know what they are and how they work, but in fact many people don’t.

Is PostgreSQL autovacuum too aggressive?

Ameen Abbas · September 17, 2017

I covered vacuum basics in my earlier post. In this post, I'm covering the importance of aggressive autovacuum. Database Administrators who just started their career might have doubts in their mind

How does VACUUM work in PostgreSQL

Richard Yen · August 24, 2017

I recently had a customer who was trying to figure out why his VACUUM-for-wraparound was taking so long–he had a 6TB database, and the VACUUM had been running for over 4 days.

Controlling Autovacuum in PostgreSQL

Bruce Momjian · January 9, 2017

Unlike other database systems, Postgres makes the cleanup process visible and tunable to users. Autovacuum performs recycling of old rows and updates optimizer statistics.

Get Postgres tips & tricks

Subscribe to our newsletter to get advanced Postgres how-tos.

Related Tutorials

Featured Webinar

How to Monitor Postgres Like a Pro!

Monitoring is a critical element for overall performance of the database. Learn how to ensure your database is healthy and contributing to the long term stability of your database and application.

Watch Now

Introducing Postgres Pulse Live

Free To Attend: Every other Monday 11AM ET

A biweekly blog and live video forum series built to offer insight into how we analyze problems and develop solutions using Postgres.

About Postgres Pulse Live

Postgres Enterprise Manager

Postgres Performance Tuning, Monitoring and Alerting Tool

In this tech guide, we describe the six things a developer should know about in terms of how easy it is to install, work with, and deploy Postgres as well as the unique capabilities and wide range of features that Postgres offers.

Download Now