logoalt Hacker News

getbrew • today at 2:33 AM • 3 replies • view on HN

The HOT chapter is the one with the most direct practical payoff. Two things worth knowing from it: HOT only kicks in when no indexed column changes and the new tuple fits on the same page, so an index on a frequently-updated column (status, updated_at) quietly disables it for every update to that table. And lowering fillfactor (say 80-90) on update-heavy tables leaves free space on each page so HOT can actually happen. Comparing n_tup_hot_upd to n_tup_upd in pg_stat_user_tables is a cheap way to see whether you're getting HOT updates before tuning anything.


Replies

ak39 • today at 5:15 AM

Why does this comment sound AI generated?

ComputerGuru • today at 3:33 AM

Depends on how wide your columns are and how often your records are modified. Past a certain width and I’m not sure lowering fillfactor is a good idea.

hmokiguess • today at 3:19 AM

I’ll be real, I use Postgres every day and I have no clue what you’re talking about

➕ show 1 reply