Skip to main content
CourseFlix

PostgreSQL Uncovered: Internals, Trace Analysis, and Performance

0h 0m 0s
English
Paid

Explore the inner workings of PostgreSQL with this comprehensive course designed for developers, database administrators, and anyone keen to understand what happens "under the hood" of this powerful DBMS.

Course Overview

Beginning with familiar SQL queries, this course will guide you step by step into the internal mechanics of PostgreSQL. You will gain insight into:

  • The functionality of the query planner
  • Structure and organization of transactions and isolation
  • The mechanics of MVCC (Multi-Version Concurrency Control)
  • The role and operation of B+Tree indexes
  • Management of shared buffers
  • The importance and process of WAL (Write-Ahead Logging)
  • Understanding vacuum and autovacuum processes
  • Checkpoints and replication
  • And many other critical PostgreSQL mechanisms

Theory and Practice

The course offers a blend of theoretical knowledge and hands-on practice, enabling you to:

  • Read and interpret EXPLAIN ANALYZE statements in detail (BUFFERS, VERBOSE, TIMING)
  • Utilize tools like gdb and perf to analyze traces
  • Understand and interpret PostgreSQL logs
  • Identify and resolve performance bottlenecks in complex scenarios

Outcomes

Upon completing the course, PostgreSQL will no longer be a "black box". You'll have a clear understanding of why queries behave as they do and how to optimize them efficiently at the core DBMS level.

About the Author: Bin Wang

Bin Wang thumbnail
An expert in solving complex problems in software development, possessing deep knowledge of the TCP core, MySQL, and PostgreSQL, as well as being passionate about artificial intelligence, history, mathematics, and physics.

Books

Read Book PostgreSQL Uncovered: Internals, Trace Analysis, and Performance

#TitleTypeOpen
1Lesson 1. Why PostgreSQL Is More Than Just Data StoragePDF
2Lesson 2. Inside PostgreSQL Unlocking Secrets with Trace AnalysisPDF
3Lesson 3. How a SQL Query Is Executed in PostgreSQLPDF
4Lesson 4. PostgreSQL Architecture Inside the Database EnginePDF
5Lesson 5. PostgreSQL Indexes Deep Dive for DevelopersPDF
6Lesson 6. Why PostgreSQL Uses Heap StoragePDF
7Lesson 7. How PostgreSQL Finds Rows in a B+ Tree_A Step-by-Step ExamplePDF
8Lesson 8. B+ Tree Depth in PostgreSQL and Its Performance ImpactPDF
9Lesson 9. Index-Only Scans in PostgreSQL When Tables Are SkippedPDF
10Lesson 10. Shared Buffers Explained What PostgreSQL Caches InternallyPDF
11Lesson 11. Understanding WAL in PostgreSQL The Write-Ahead LogPDF
12Lesson 12. Inside PostgreSQL Writes From Shared Buffers to DiskPDF
13Lesson 13. Why Doesn’t PostgreSQL Use Undo Logs for MVCCPDF
14Lesson 14. MVCC Internals_How PostgreSQL Keeps Old Versions AlivePDF
15Lesson 15. Autovacuum in PostgreSQL How It Works and When It FailsPDF
16Lesson 16. PostgreSQL VACUUM Understanding Performance, Benefits, and CostsPDF
17Lesson 17. System Catalogs The Metadata Control Center of a DatabasePDF
18Lesson 18. Inside PostgreSQL How Transactions Really WorkPDF
19Lesson 19. PostgreSQL’s Hidden Strength Transactional DDLPDF
20Lesson 20. How PostgreSQL Ensures Atomicity Using MVCC, CLOG, and WALPDF
21Lesson 21. Data Consistency in PostgreSQL_Constraints and GuaranteesPDF
22Lesson 22. Isolation Levels in PostgreSQL_A Practical IntroductionPDF
23Lesson 23. Same Isolation Level, Different Behavior PostgreSQL vs MySQLPDF
24Lesson 24. Durability in PostgreSQL_How Crashes Don’t Lose DataPDF
25Lesson 25. Why ROLLBACK Is So Fast in PostgreSQLPDF
26Lesson 26. Checkpoints in PostgreSQL_What They Are and Why They MatterPDF
27Lesson 27. Transaction ID Wraparound Why It Happens and How to Handle ItPDF
28Lesson 28. Locks in PostgreSQL_An Easy Guide to Types and Use CasesPDF
29Lesson 29. Do Read-Only Queries Really Need VACUUM in PostgreSQLPDF
30Lesson 30. Inside PostgreSQL’s Planner_From Query to Logical PlanPDF
31Lesson 31. Inside PostgreSQL’s Cost Model How the Planner ThinksPDF
32Lesson 32. How JOINs Work Internally in PostgreSQLPDF
33Lesson 33. Join Tree Structures in Query OptimizationPDF
34Lesson 34. Join Enumeration Strategies Dynamic Programming vs Genetic SearchPDF
35Lesson 35. How PostgreSQL Reduces the Join Search SpacePDF
36Lesson 36. Understanding Join Graph Topology and Its Impact on Query OptimizationPDF
37Lesson 37. Why PostgreSQL Handles This JOIN 10× Faster Than MySQLPDF
38Lesson 38. How PostgreSQL Aggregates Work InternallyPDF
39Lesson 39. PostgreSQL Parallel Query Execution The Key to Faster AnalyticsPDF
40Lesson 40. WITH Queries Demystified How PostgreSQL Plans CTEsPDF
41Lesson 41. How Databases Execute Window Functions A Deep DivePDF
42Lesson 42. Why PostgreSQL Query Optimization Is So ChallengingPDF
43Lesson 43. Planner Challenges in Distributed PostgreSQLPDF
44Lesson 44. What PostgreSQL Extensions Are and How They WorkPDF
45Lesson 45. Representative PostgreSQL Extensions and Their CapabilitiesPDF
46Lesson 46. Understanding Hstore’s Extension Mechanism in PostgreSQLPDF
47Lesson 47. How pg_trgm Speeds Up Fuzzy Text SearchPDF
48Lesson 48. Inside PostgreSQL Extensions_How FDW Works Under the HoodPDF
49Lesson 49. Inside PostgreSQL Extensions_How Citus Works Under the HoodPDF
50Lesson 50. How Citus Teaches the Planner to Think GloballyPDF
51Lesson 51. How Citus Handles Joins InternallyPDF
52Lesson 52. Citus Transactions Uncovered How It Really WorksPDF
53Lesson 53. How Extensions Shape PostgreSQL Planning and ExecutionPDF
54Lesson 54. PostgreSQL Extensions_How They Affect Performance and StabilityPDF
55Lesson 55. Why Hotspot Updates Hurt PostgreSQL PerformancePDF
56Lesson 56. Why Long Transactions May Kill Your PostgreSQL PerformancePDF
57Lesson 57. Why Performance Degrades Quickly in Long-Running TPC-C TestsPDF
58Lesson 58. Trace Analysis_Understanding Its Power and LimitationsPDF
59Lesson 59. Migrating from MySQL to PostgreSQL Key Differences You Need to KnowPDF
60Lesson 60. Becoming a PostgreSQL Expert_Roadmap to Rapid GrowthPDF