7 ms·
The thing we really strive for with Postgres is to keep the UPDATE traffic as low as possible. Because of MVCC, table bloat and the subsequent vacuum jobs will
by spprashant 1y ago
The thing we really strive for with Postgres is to keep the UPDATE traffic as low as possible. Because of MVCC, table bloat and the subsequent vacuum jobs will kill your IO even further. This means designing the applications and data model in a way that most write traffic is INSERT, with occasional UPDATEs which cannot be avoided. If you know you are going to have a UPDATE heavy table, be sure to set the fill_factor on the table ahead of time to optimize for it.
Also, in my experience "Faster SSD Storage" point applies to both read and write heavy workloads.
- perfmode 1y agodo upserts (on conflict do) count as update?
- whatevaa 1y agoIf they update, yes.
- spprashant 1y agoYeah ON CONFLICT and MERGE are just syntactic sugar. At a fundamental level there are only Insert, update, delete and select operations on a SQL row.