4 ms·
They're not irrelevant if you have parallel users modifying the database. The integrity checks in particular are only guarantee a coherent snapshot during a tra
by fusiongyro 14y ago
They're not irrelevant if you have parallel users modifying the database. The integrity checks in particular are only guarantee a coherent snapshot during a transaction, so if you do two queries and someone sneaks in a modification between them you'll get an incoherent snapshot. Whether or not this matters will depend on what sort of aggregate data you're creating.
The cost of a short-lived read transaction is incredibly low, especially with Postgres. All the data for the last so many transactions will be in the database anyway until a vacuum happens. There's no CPU cost to read transactions that I'm aware of.
- jcdavis 14y agoInstagram is heavily sharded, so they've pretty much already given up a snapshot view of all their data anyways.
- fusiongyro 14y agoOh, I trust they understand what they're up to. It's just not advice everybody should follow blindly.