logo
episode-header-image
Nov 2021
27m 53s

Postgresql index bloat | The Backend Eng...

Hussein Nasser
About this episode

Postgresql database implements MVCC by creating a new row version for any update/delete/or insert. While this is a sound implementation to support concurrent transactions reading old version of the rows, it does have some side effects and this is what I want to discuss in this episode of the backend engineering show.

0:00 Intro

1:00 Postgres MVCC design

6:42 MVCC on other databases

11:15 Side-effects of Row-versioning

17:00 Postgres HOT optimization

19:50 How Index bloat affects Performance

24:20 How Postgres 14 Addresses index bloat

Cards:

14:12 b-tree https://www.youtube.com/watch?v=a1Z40OC553Y

Resources

https://www.postgresql.org/docs/14/btree-implementation.html#BTREE-DELETION

--- Support this podcast: https://anchor.fm/hnasr/support
Up next
Jun 13
kTLS - Kernel level TLS
Fundamentals of Operating Systems Course https://oscourse.winktls is brilliant.TLS encryption/decryption often happens in userland. While TCP lives in the kernel. With ktls, userland can hand the keys to the kernel and the kernel does crypto. When calling write, the kernel encryp ... Show More
22m 55s
May 9
The beauty of the CPU
If you are bored of contemporary topics of AI and need a breather, I invite you to join me to explore a mundane, fundamental and earthy topic.The CPU.A reading of my substack article https://hnasr.substack.com/p/the-beauty-of-the-cpu 
9m 38s
Apr 18
Sequential Scans in Postgres just got faster
This new PostgreSQL 17 feature is game changer. They know can combine IOs when performing sequential scan. Grab my database coursehttps://courses.husseinnasser.com 
27m 36s
Recommended Episodes
Oct 2023
166: Speedy Database Queries with Lukas Fittl
- pganalyze: https://pganalyze.com/- Weekly series "5mins of Postgres": https://www.youtube.com/channel/UCDV_1Dz2Ixgl1nT_3DUZVFw- How Postgres chooses which index to use: https://pganalyze.com/blog/how-postgres-chooses-index- CMU databases courses: https://db.cs.cmu.edu/courses/- ... Show More
1h 12m
Feb 2024
Postgres Replication at speed with PeerDB's Sai Srirampur
Join Scott Hanselman as he sits down with Sai Srirampur, as they explore the intricacies of Postgres Replication and how it can be turbocharged using PeerDB. In the realm of databases, Postgres Replication is like a well-choreographed dance between servers. Sai takes us behind th ... Show More
27m 6s
Sep 2023
Episode 486: High Performance PostgreSQL for Rails with Andrew Atkinson
If you love taking about databases, this is the episode for you. Ahead of the launch of his new book, High Performance PostgreSQL for Rails, Andrew Atkinson joined the show with special guest co-host, Pat Bair, to talk about why he wrote a book, why he focused on PostgreSQL and h ... Show More
31m 29s
Apr 2022
Postgres.js
Rasmus Porsager created Postgres.js –the fastest full-featured PostgreSQL client for Node.js and Deno. Today he joins Jerod for a deep-dive on Postgres, why he created this open source library, and how you can use it to build pg-backed JavaScript applications. Discuss on Changelo ... Show More
50m 6s
Mar 2020
Easier Stream Processing On Kafka With ksqlDB
Summary Building applications on top of unbounded event streams is a complex endeavor, requiring careful integration of multiple disparate systems that were engineered in isolation. The ksqlDB project was created to address this state of affairs by building a unified layer on top ... Show More
43m 36s
Apr 2022
Postgres.js (JS Party #221)
Rasmus Porsager created Postgres.js –the fastest full-featured PostgreSQL client for Node.js and Deno. Today he joins Jerod for a deep-dive on Postgres, why he created this open source library, and how you can use it to build pg-backed JavaScript applications. Discuss on Changelo ... Show More
50m 6s
May 2023
The ORMazing show
Nick & KBall sit down with the brilliant Stephen Haberman to discuss all things ORMs! 💻🔍 From the advantages and disadvantages of ORMs in general, to delving into the intricacies of his innovative project Joist, which brings a fresh, idiomatic, ActiveRecord-esque approach to Ty ... Show More
1h 12m
Feb 2024
Episode 507: Stephen Margheim on SQLite in Ruby on Rails Applications
If you start a new Rails project today, you’re probably going to pick Postgres for your database. And if you have a ten year old Rails app, you might be using MySQL. But Rails ships with support for SQLite, a lightweight SQL database. Can that lightweight database be used to make ... Show More
31m 21s
Jun 2023
#420: Database Consistency & Isolation for Python Devs
See the full show notes for this episode on the website at talkpython.fm/420 
56m 2s
Nov 2022
Analyze Massive Data At Interactive Speeds With The Power Of Bitmaps Using FeatureBase
Summary The most expensive part of working with massive data sets is the work of retrieving and processing the files that contain the raw information. FeatureBase (formerly Pilosa) avoids that overhead by converting the data into bitmaps. In this episode Matt Jaffee explains how ... Show More
59m 25s