3 ms·
You are updating both the data and the index when updating amount instead of just the data. That is twice the number of IO's.
by cwbriscoe 2y ago
You are updating both the data and the index when updating amount instead of just the data. That is twice the number of IO's.
- VWWHFSfQ 2y agoIt's the same IOs. PG does it regardless. Both the data and index
- Izkata 2y agoI believe they're confusing a single index with more columns vs adding additional indexes. Additional indexes would be slower to update. I suppose additional columns could be slower to update too (more data structure traversal), but I'm guessing not by nearly as much as an additional index.