We may earn an affiliate commission when you visit our partners.
Lucian Oprea

PostgreSQL is one of the most powerful and easy-to-use database management systems. It has strong support from the community and is being actively developed with a new release every year.

PostgreSQL supports the most advanced features included in SQL standards. It also provides NoSQL capabilities and very rich data types and extensions. All of this makes PostgreSQL a very attractive solution in software systems.

Read more

PostgreSQL is one of the most powerful and easy-to-use database management systems. It has strong support from the community and is being actively developed with a new release every year.

PostgreSQL supports the most advanced features included in SQL standards. It also provides NoSQL capabilities and very rich data types and extensions. All of this makes PostgreSQL a very attractive solution in software systems.

However, getting the best performance from it has not been an easy subject to tackle. You need just the right combination of rules of thumb to get started, proper testing, solid monitoring, and maintenance to keep your system running well, and hints for add-on tools to add the features the core database doesn't try to handle on its own.

This Udemy course is structured to give you both the theoretical and practical aspects to implement a High-Performance Postgres. It will help you build dynamic database solutions for enterprise applications using one of the latest releases of PostgreSQL.

You'll examine all the advanced aspects of PostgreSQL in detail, including logical replication, database clusters, performance tuning, and monitoring. You will also work with the PostgreSQL optimizer, configure Postgres for high speed by looking at transactions, locking, indexes, and optimizing queries.

You are expected to have some exposure to databases. Basic familiarity with database objects such as tables and indexes is expected. You will find this Udemy course really useful if you have no or a little exposure to PostgreSQL. If you have been working with PostgreSQL for a few years, you should still find a few useful commands that you were not aware of or a couple of optimization approaches you have not tried. You will also gain more insight into how the database works.

PostgreSQL Performance Tuning Online Course Curriculum:

Understanding PostgreSQL Server Architecture

  • In this section, we will explore the PostgreSQL Architecture.

  • Shared Buffers work in cooperation with the operating system cache, rather than replacing it. These caches improve performance by reducing the physical I/O necessary.

  • Why do we need to set Checkpoints carefully to limit crash recovery time, while not impacting the rest of the system's performance?

  • This section will give you all an introduction to why we need the WAL Writer and also the Background Writer.

  • See the stages that the Query Processor has to pass in order to obtain the results.

  • The utility Subsystem provides ways to maintain the database, such as claiming storage, updating statistics and logging.

Configuring Vacuum for Performance

  • We will understand why any time we do an UPDATE or DELETE, we will leave a dead row behind (and potentially a dead index entry) that needs to be cleaned up later by some form of vacuum.

  • We will learn that when tables grow very large because of excessive dead tuples then performance will tend to decrease. Therefore the VACUUM process should never be avoided.

  • This section explains why it's better to have a steady low-intensity vacuum work, using the autovacuum feature of the database, instead of disabling that feature and having to do that cleanup in larger blocks.

How to use an Index efficiently

  • Understand that adding an index increase overhead every time you add or change rows in a table. Each index needs to satisfy enough queries to justify how much it costs to maintain.

  • In this section, we'll explain why the execution plan of a query depends on the data inside the table. If the data has low carnality, PostgreSQL will most probably ignore the index

  • In this section we'll learn why an index is only useful if it is selective; it can be used to only return a small portion of the rows in a table.

  • In this section, we will explore how to use bitmap scans effectively

Index Optimization Tips

  • On top of just using indexes, it is also possible to implement custom strategies for your particular application to speed things up

  • How to be able to answer queries by only using the data in an index using covering indexes.

  • This section covers why defining indexes on foreign keys it's a good practice.

  • In this section, we will explore partial indexes and how small, efficient index can be enjoyed.

  • Indexes can require periodic rebuilding to return them to optimum performance, and clustering the underlying data against the index order can also help improve their speed for queries.

  • We'll explain when it's useful to modify the fill factor parameter of a table.

  • In this section, we will see in which cases it's better to use a combined index vs multiple independent indexes.

Making Use of Statistics

  • In this section, you'll explore statistics that can help you find and sort the queries that are responsible for most of the load on the system.

  • PostgreSQL offers a large set of statistics. In this section, we'll make it easier to take advantage of their insights.

  • We'll get to see the fastest way to detect missing indexes but we'll also explore when it's necessary to drop indexes.

Spotting Query Problems

  • We'll explain how to read query plans and understand how each of the underlying node types works.

  • We'll get to see how queries are executed as a series of nodes that each do a small task, such as fetching data aggregation or sorting.

  • We'll explore portions of the query that actually had the longest execution time, and see if they had an appropriate matching cost.

  • The variation between estimated and actual rows can cause major planning issues. We'll explore what we can do in such cases.

Query Optimizations Tips

  • We'll see why it's important to first question the semantic correctness of a statement before attacking the performance problem

  • We'll understand why we should avoid SELECT *

  • We will cover how shared_buffers works in cooperation with operating system cache, rather than replacing it and we should size it as only a moderate percentage of total RAM.

  • We will understand that if we want to do better than allocating a percentage to the shared_buffers relative to the OS cache, we need to analyze the buffers cache content

Scaling and Replication

  • We'll see how replication can also be used to improve the performance of a software system by making it possible to distribute the load on several database servers.

  • In some cases, the functionality of replication provided by PostgreSQL isn't enough. There are third-party solutions that work around PostgreSQL, providing extra features, such as Pgpool-II which can work as a load balancer and Postgres-XL which implements a multi-server distributed database solution that can operate very large amounts of data and handle a huge load.

Enroll now

What's inside

Learning objectives

  • The theory of postgresql architecture and how it works under-the-hood
  • Understand how to set shared_buffers for better performance
  • Learn how to configure vacuum to keep the database clean and fast
  • How to use an index efficiently
  • Practice index optimization strategies
  • How to make sense of statistics
  • Master how to spot query problems
  • Practice query optimizations techniques
  • Fundamental concepts for scaling and replication in postgresql

Syllabus

We'll covered the important processes and memory structures in PostgreSQL. We'll also see how some configuration settings can effectively be used to optimize the database performance.
Read more
Client-Server Architecture
Client-Server Architecture Quiz

Shared Buffers works in cooperation with operating system cache, rather than replacing it. These caches improve performance by reducing the physical I/O necessary.

Understanding the Shared Buffer Quiz

The stages a query has to pass in order to obtain the results.

The Path of the Query Quiz

Checkpoints need to be tuned carefully to move limit crash recovery time, while not impacting the rest of the system's performance.

Checkpoint Quiz
Postgres background writers
Postgres Background Writers
Utility Processes
Download Supplemental: PostgreSQL Architecture
Configuring Vacuum for Performance
Understanding Vacuum
Watching Vacuum at work
Making EXPLAIN more verbose
Finding bloated tables
Fighting table bloat
Basic Cost Computation
Common Vacuum problems
How to use an Index efficiently
Making Use of Indexes
Basic Cost Computation Quiz
Using indexes in an intelligent way
Using indexes in an intelligent way Quiz
Bitmap Scans
Bitmap Scans Quiz
Index Optimization Tips
Making use of Index-Only scans and Covering Indexes
Index-Only Scans
Covering Indexes
Indexing Foreign Keys
Indexing Foreign Keys Quiz
Partial Indexes
Partial Indexes Quiz
Clustered Tables
Cluster Command
Cluster Command Quiz
Fill Factor
Fill Factor Quiz
Combined vs Independent Indexes
Combined vs Independent Indexes Quiz
Making Use of Statistics
Taking advantage of pg_stat_statements
Taking advantage of pg_stat_statements Quiz
Top 10 Time-Consuming Queries
Inspecting Table Statistics
Detect Missing Indexes
Hot Updates
Hot Updates Quiz
Finding Useless Indexes
Spotting Query Problems
Understanding Execution Plans
Understanding Execution Plans Quiz
Spotting Query Problems Quiz
Query Optimizations Tips
Doing Joins Right
Doing Joins Right Quiz
Forcing Join Order
Forcing Join Order Quiz
Avoid Using SELECT *
Avoid Using SELECT * QUIZ
Avoid ORDER BY
Avoid ORDER BY Quiz
Avoid DISTINCT
Avoid DISTINCT Quiz
Reducing the Number of SQL Statements
Parallel Queries
Parallel Queries Quiz
The shared_buffers cache works in cooperation with operating system cache, rather than replacing it. How to set shared_buffers based on usage count analysis .
PostgreSQL Memory System
Vertical vs Horizontal Scalability
Analyzing PostgreSQL shared_buffers contents
Scalability And Replication
PostgreSQL Scalability
PostgreSQL Scalability Quiz
Vertical vs Horizontal Scalability Quiz
Master-slave(s) with read/write separation
Master-slave(s) with read/write separation Quiz
Physical Replication
Log Shipping
Log Shipping Quiz
Streaming Replication
Streaming Replication Quiz
Logical Replication
Logical Replication Quiz
Multi-Master Full Replication
Multi-Master Full Replication Quiz

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Explores PostgreSQL architecture, which is essential for database administrators to understand how the system works under the hood and optimize its performance effectively
Covers index optimization strategies, which are crucial for improving query performance and overall database efficiency in PostgreSQL environments
Discusses scaling and replication techniques, which are vital for managing large databases and ensuring high availability in enterprise applications
Requires familiarity with database objects like tables and indexes, suggesting it's best suited for those with some prior database experience
Teaches how to configure Vacuum, which is essential for maintaining database cleanliness and speed by removing dead tuples and preventing performance degradation
Examines query optimization techniques, which are important for identifying and resolving performance bottlenecks in PostgreSQL databases

Save this course

Save PostgreSQL High Performance Tuning Guide to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in PostgreSQL High Performance Tuning Guide with these activities:
Review Database Fundamentals
Reinforce your understanding of core database concepts like normalization, indexing, and query optimization to better grasp PostgreSQL-specific tuning techniques.
Browse courses on Database Fundamentals
Show steps
  • Review basic database terminology and concepts.
  • Practice writing basic SQL queries.
  • Research different database architectures.
Read 'PostgreSQL Administration Cookbook'
Supplement your learning with practical examples and solutions for PostgreSQL administration, focusing on performance tuning aspects.
Show steps
  • Obtain a copy of 'PostgreSQL Administration Cookbook'.
  • Read the chapters related to performance tuning and optimization.
  • Experiment with the provided recipes on a test database.
Optimize Sample Queries
Sharpen your query optimization skills by analyzing and improving the performance of provided sample queries.
Browse courses on Query Optimization
Show steps
  • Obtain a set of sample SQL queries.
  • Analyze the execution plan of each query.
  • Identify potential performance bottlenecks.
  • Apply optimization techniques like indexing and rewriting queries.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Read 'High Performance PostgreSQL, 3rd Edition'
Deepen your understanding of PostgreSQL performance tuning with a comprehensive guide covering advanced topics and real-world examples.
Show steps
  • Obtain a copy of 'High Performance PostgreSQL, 3rd Edition'.
  • Read the chapters relevant to your specific performance goals.
  • Implement the recommended techniques in your own environment.
Document Performance Tuning Strategies
Solidify your understanding by creating a document that summarizes key performance tuning strategies covered in the course.
Browse courses on Performance Tuning
Show steps
  • Review the course materials on performance tuning.
  • Summarize the key strategies and techniques.
  • Provide examples of how to apply each strategy.
Benchmark PostgreSQL Configurations
Apply your knowledge by benchmarking different PostgreSQL configurations and analyzing their performance impact.
Browse courses on Performance Testing
Show steps
  • Set up a test environment with PostgreSQL.
  • Define a set of benchmark queries.
  • Configure PostgreSQL with different settings.
  • Run the benchmarks and collect performance data.
  • Analyze the results and identify optimal configurations.
Contribute to PostgreSQL Documentation
Enhance your understanding and contribute to the community by improving PostgreSQL documentation related to performance tuning.
Browse courses on PostgreSQL
Show steps
  • Identify areas in the PostgreSQL documentation that need improvement.
  • Research the topic and gather accurate information.
  • Write clear and concise documentation.
  • Submit your changes to the PostgreSQL project.

Career center

Learners who complete PostgreSQL High Performance Tuning Guide will develop knowledge and skills that may be useful to these careers:
Performance Engineer
Performance Engineers specialize in improving the speed and efficiency of software systems. This course is very relevant for a performance engineer who needs to understand the inner workings of PostgreSQL and how to tune it for maximum performance. This role specifically requires knowledge of query optimization, index management, and replication strategies, all of which are covered in this course. The performance engineer will learn how to analyze query plans, identify bottlenecks, and apply specific techniques to improve database efficiency. This course will help the performance engineer manage the database for optimal performance
Database Administrator
A Database Administrator is responsible for the performance, integrity, and security of a database. This course, with its focus on PostgreSQL optimization, is directly applicable to the daily tasks of a database administrator. It will be particularly useful for maintaining and optimizing PostgreSQL databases. The administrator would use the knowledge of indexes, query optimization, and vacuuming techniques to ensure optimal performance. This course will help a database administrator understand the underlying architecture of PostgreSQL and how to tune it for peak efficiency. It would be useful to anyone looking to ensure a high-performing database.
Database Engineer
Database Engineers often design, build, and maintain database systems. This course provides a strong foundation for understanding how to optimize PostgreSQL for high performance. The advanced topics covered are useful for database engineers involved in database design and implementation, particularly how to use indexes efficiently, optimize queries, and configure replication. Furthermore, knowledge of the PostgreSQL architecture, as covered in the course, will help database engineers in their planning and maintenance decisions. This course may be useful for those who want to create robust database solutions.
Database Developer
Database Developers spend their time creating and optimizing database functions, procedures, and triggers. This course, with its focus on PostgreSQL performance tuning, is directly beneficial to anyone wishing to become a database developer. This course will help a developer understand how to use indexes, optimize queries, and configure replication, all of which will make them better prepared to build and maintain databases. The database developer will gain practical skills and theoretical knowledge, and will understand the details of transactions, locking, and indexes. This course is useful for database developers who want to create high performance applications.
Cloud Database Engineer
Cloud Database Engineers design, deploy, and manage databases in cloud environments. This course is directly relevant to a cloud database engineer who works with PostgreSQL databases on cloud platforms. A cloud database engineer will be able to use knowledge of performance tuning and optimization to make sure database performance is at its peak. Understanding replication, query optimization, and statistics will provide a strong foundation for cloud database management. This course is useful for those who need to manage PostgreSQL in cloud environments.
Backend Developer
Backend Developers create and maintain the server-side logic and databases that power applications. This course will help a backend developer who is responsible for database performance. The techniques for optimizing queries, using indexes effectively, and understanding PostgreSQL's architecture are directly applicable to their work. This course helps backend developers who want to ensure their database is not a bottleneck. The practical skills learned could be directly used in developing and maintaining database applications. This course is useful for backend developers who are looking to optimize their database interactions.
Software Developer
Software Developers design, code, and test software applications. The practical knowledge gained in this course would directly benefit any software developer working with the PostgreSQL database with a focus on performance. A software developer will understand the importance of database optimization through a variety of techniques, including indexing, vacuuming, and query optimization. This course provides insights into the database architecture itself. This course may be useful for software developers who wish to make informed decisions about database performance.
Technical Lead
Technical Leads oversee development teams and make critical technical decisions. This course provides a strong technical background in PostgreSQL performance, which will be useful for technical leads who must guide the technical direction of software systems that rely on a PostgreSQL database. The knowledge of query optimization, index management, and replication will make them better prepared to make informed decisions about database design. The technical lead will understand the importance of performance optimization in a larger context. This course will help technical leads who wish to guide their teams to build high-performing systems.
Data Architect
Data Architects create blueprints for data management systems, specifying data models, database schemas, and integration strategies. A thorough understanding of PostgreSQL's architecture, as covered in this course, is beneficial for a data architect who must make informed decisions about database design and performance. The ability to diagnose query problems, optimize indexes, and configure replication, covered in this course, directly impacts the system design. This course may also be useful for those creating reliable database systems.
Systems Engineer
Systems Engineers are involved in the design, implementation, and management of complex systems. This course will help a systems engineer responsible for the database component of a larger system, particularly when that component is a Postgres database. The understanding of PostgreSQL's inner workings and optimization techniques, like configuring vacuum for performance and scaling, covered in the course, is directly applicable to their work. Systems engineers will find the insights into query optimization and system architecture to be applicable to their tasks. This course will help those who manage complex systems that rely on a database.
Application Developer
Application Developers are responsible for building and maintaining software applications. This course may be useful to application developers who need to interact directly with the database. The developers will have a better understanding of database performance, including how to optimize queries and use indexes effectively. While the course does not focus directly on application development, any developer will benefit from having a fundamental knowledge of database performance. This course may be useful for developers who want to improve their database interactions.
Site Reliability Engineer
Site Reliability Engineers ensure the reliability and performance of systems. This course, with its focus on PostgreSQL optimization, may be useful to a Site Reliability Engineer (SRE) who is responsible for the database component of a system. The concepts in the course about indexes, query optimization, and vacuuming, as well as database architecture can be useful for making a system reliable. The course will help the SRE understand performance issues related to databases. This course may help the SRE understand the performance of the PostgreSQL system.
Data Analyst
Data Analysts interpret data and identify trends, often using SQL queries to extract insights from databases. This course, while focused on performance, may be useful to a data analyst who wishes to optimize their data retrieval. Even though this course is not directly about SQL syntax, the concepts of query planning and optimization, as presented here, are relevant to data analysts who want to improve query speed. They may gain insight into how indexes, statistics, and other factors affect the speed of data retrieval. This course may be useful for anyone who works with data and wants to make sure their queries are efficient.
Data Scientist
Data Scientists use statistical techniques to derive insights from data. This course may be useful to a data scientist who needs to understand the fundamentals of database performance when working with PostgreSQL. While this course does not focus on data analysis techniques, the underlying concepts of query optimization and database architecture are applicable when working with large databases and need to retrieve data from them. The data scientist may benefit from the knowledge of the underlying architecture as well as index design. This course may be useful in optimizing workflows that involve querying data.
Solutions Architect
Solutions Architects design and plan technology solutions to meet business needs. This course may be useful to a solutions architect who needs to understand the capabilities and performance implications of using PostgreSQL in a larger technology stack. The knowledge of scaling strategies, replication, and performance tuning gives a high level overview of what is possible with PostgreSQL. The course will help them to understand the underlying structure of PostgreSQL. This course may be useful when planning for projects that use a Postgres database.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in PostgreSQL High Performance Tuning Guide.
Comprehensive guide to optimizing PostgreSQL performance. It covers topics such as hardware selection, configuration, query optimization, and monitoring. This book is commonly used by industry professionals and valuable reference for anyone looking to improve the performance of their PostgreSQL database. It adds breadth to the course by covering more advanced topics and providing real-world examples.
Provides practical solutions to common PostgreSQL administration tasks, including performance tuning. It offers recipes for optimizing queries, managing indexes, and configuring the server for high performance. This book valuable resource for both beginners and experienced PostgreSQL administrators. It adds depth to the course by providing real-world examples and step-by-step instructions.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser