PostgreSQL Tutorial: Tuning Internal Statistics (pg_stats)
Summary: In this tutorial, you’ll learn how PostgreSQL internal statistics (pg_stats) work and some optimization guides.
Summary: In this tutorial, you’ll learn how PostgreSQL internal statistics (pg_stats) work and some optimization guides.
Summary: in this tutorial, you will learn how to tune random_page_cost setting in PostgreSQL.
As applications grow, PostgreSQL tables inevitably scale from thousands of records to hundreds of millions or even billions. Performance degradation for large tables is rarely sudden; instead, it happens through a process of silent degradation over time.
Scaling Postgres’s high-concurrency handling capability can never rely on simply throwing more hardware at the problem. Each database connection incurs a hidden system tax, including Linux-level memory and CPU overhead, as well as Postgres-level MVCC (Multi-Version Concurrency Control) and locking constraints. To handle high-performance workloads, we need to stop guessing and start precisely tuning our systems by deeply understanding these underlying limitations.
This chapter explains how to optimize PostgreSQL performance and provides examples.
Summary: In this tutorial, you will learn how to enable atomic writes at the storage layer and disable full_page_writes to boost OLTP processing performance of PostgreSQL.
Summary: Using Huge Pages reduces the memory page table size of PostgreSQL processes and cuts down CPU overhead spent on memory management, thereby improving overall database performance.
Summary: In this tutorial, you will learn about pg_stat_io view, including byte-level I/O statistics, WAL tracking, and comprehensive real-world use cases for better database performance tuning.
Summary: in this tutorial, you will learn how PostgreSQL collects partitioned table statistics and how they affect PostgreSQL’s estimates.
Summary: in this tutorial, you will learn what’s ’estimated rows’ in EXPLAIN output all about.
Copyright (c) 2017 - 2025, Redrock Data Services, Inc. All rights reserved.