PostgreSQL High Performance Tuning Guide
Please rate the course
Course short description
PostgreSQL is one of the most powerful and convenient database management systems. It is actively supported by the community and receives new releases every year.
PostgreSQL supports the most advanced features of the SQL standard, as well as providing NoSQL capabilities, a rich set of data types, and extensions. All of this makes PostgreSQL an attractive solution for software systems.
However, extracting maximum performance from PostgreSQL is not an easy task. It requires a combination of proven techniques, thorough testing, reliable monitoring, and regular maintenance. It is also important to use additional tools that complement the capabilities of the main database.
This course provides you with both theoretical and practical knowledge to create high-performance solutions based on PostgreSQL. You will learn how to build dynamic databases for enterprise applications using the latest versions of PostgreSQL.
In the course, we will thoroughly examine advanced aspects of PostgreSQL such as logical replication, database clusters, performance tuning, and monitoring. You will learn how to work with the PostgreSQL optimizer, configure it for high speed, manage transactions, locks, indexes, and optimize queries.
The course assumes basic knowledge about databases, such as tables and indexes. This course will be useful both for newcomers to PostgreSQL and for those who have been working with it for several years. Even experienced PostgreSQL users will discover several new commands and optimization approaches, as well as gain a better understanding of how the database works.
Course on PostgreSQL Performance Tuning: Program
Learning PostgreSQL Server Architecture
In this section, we will explore the architecture of PostgreSQL. We will understand how the collaboration of Shared Buffers and the operating system cache improves performance by reducing the amount of physical input/output. We will also discuss the importance of configuring Checkpoints to minimize recovery time after failures and the necessity of the WAL Writer and Background Writer processes for efficient system functioning. We will learn about the stages the query processor goes through to achieve results and about the subsystems that ensure database maintenance.
Configuring VACUUM for Performance Improvement
We will look into why each UPDATE or DELETE operation leaves behind "dead" rows and indexes that require subsequent cleaning. We will learn how excessive accumulation of such rows degrades performance and why it is better to run the VACUUM process on a regular basis using autovacuum, rather than performing clean-up manually periodically.
Effective Use of Indexes
We will understand how indexes affect the load during the addition or modification of rows and why it's necessary to selectively add indexes. We will examine why an index is used only for selecting a small portion of rows and how data cardinality affects the choice of the optimal query execution plan.
Index Optimization Tips
We will learn how to configure indexes to speed up queries. We will consider covering indexes that allow responding to queries using only index data and learn about the benefits of indexing foreign keys. We will also discuss partial indexes and index combinations for performance enhancement.
Using Statistics
We will study PostgreSQL statistics that help identify and sort queries causing the highest load. We will learn how to find missing indexes and determine when they should be removed.
Identifying Query Problems
We will learn to read query plans and understand how each type of node contributes to the query execution. We will look at ways to identify the most resource-intensive parts of queries and methods for optimizing them.
Query Optimization Tips
We will learn why the correct semantics of a query are important before optimization and when it is better to avoid SELECT *, ORDER BY, and DISTINCT. We will study PostgreSQL functions, such as CASE syntax and parallel queries, to reduce execution time.
Configuring shared_buffers for Performance Improvement
We will learn how to optimally configure the shared_buffers parameter, considering low default values and the need for correlation with the operating system cache size.
Scaling and Replication
We will explore how replication helps distribute the load across multiple servers, enhancing system performance. We will study third-party solutions, such as Pgpool-II and Postgres-XL, which provide load balancing and scalability for large data volumes.
This course provides you with all the necessary knowledge for tuning PostgreSQL for high performance and helps you apply them to create reliable and scalable solutions in real projects.