[HN Gopher] Is Postgres read heavy or write heavy?
___________________________________________________________________
Is Postgres read heavy or write heavy?
Author : soheilpro
Score : 82 points
Date : 2025-10-17 17:06 UTC (1 days ago)
(HTM) web link (www.crunchydata.com)
(TXT) w3m dump (www.crunchydata.com)
| alberth wrote:
| Odd that OLTP wasn't mentioned in the article.
|
| Postgres an an OLTP databases, which are designed for write heavy
| workloads.
|
| While that being said, I agree most people have read-heavy needs.
| da_chicken wrote:
| I disagree. I think the only people that have read-heavy needs
| are big data and data warehouses. AI being hot right now
| doesn't mean big data is the only game in town.
|
| Most applications are used operationally or have a mix of read
| and write. Even on applications where the user can only consume
| content present there, there is often more than enough data
| capture just tracking page history to be relatively write
| heavy.
| withinboredom wrote:
| Hmmm. Not really. Yes, everything is a mix, but for
| applications, it very much is on the read-heavy side. Think
| about how many queries you have to do just to display an
| arbitrary page. You might, maybe, just maybe, net 2-3 writes
| vs. hundreds of reads. If that starts to balance out, or even
| flip, then you probably need to rethink your database as you
| start to exit traditional db usage patterns. But <30% writes
| is not write-heavy.
| developper39 wrote:
| Very usefull, and it is clear that the author knows what he is
| talking about. Nice intro to Pg18 too.
| gdulli wrote:
| Is a ball red or green? How long is a piece of string?
| Rendello wrote:
| How thick is WAL?
|
| https://youtu.be/PvDBGqEykvc?t=7
| lysace wrote:
| Insipid text.
|
| Also: HN needs to upgrade its bot upvoting detection tech. This
| is embarrassing. It was proper ownage of the HN #1 position for
| like 15 minutes straight.
| akerl_ wrote:
| The rules are pretty clear that you should not do this.
|
| https://news.ycombinator.com/newsguidelines.html
| lysace wrote:
| Sosumi. I don't want to give my email to YC just to declare a
| glaring issue with their discussion platform, knowing that
| they employ multiple at least 1 full-time moderator.
|
| I understand that privacy is a foreign concept to YC, but
| that is where I'm coming from.
| zug_zug wrote:
| Off topic, but I do feel like there is a significant number of
| things that mysteriously get to frontpage with 12-40 upvotes,
| zero comments, and then sit there getting no more upvotes /
| comments for like 20 minutes.
|
| Personally I agree that it's both possible to detect this
| better and would actually drastically improve the quality of
| this site if that wasn't the meta and think it's something that
| should be openly discussed (in terms of practical suggestions).
| jagged-chisel wrote:
| > When someone asks about [database] tuning, I always say "it
| depends".
|
| Indeed. On your schema. On your usage. On your app. On your
| users.
| rednafi wrote:
| Despite using CTEs, I found the first query quite impenetrable.
| Could be because I don't spend that much time reading non-trivial
| SQL queries.
|
| I've been mostly using the `pg_stat_statements` table (the second
| technique) to find out whether my workload is read or write
| heavy, it's plenty good in most situations.
___________________________________________________________________
(page generated 2025-10-18 23:00 UTC)