6 ms·
Makes sense, but I can't help but feel it's a solution at the wrong abstraction level. It's a shame the DB can't figure this out for you.
by elsurudo 4y ago
Makes sense, but I can't help but feel it's a solution at the wrong abstraction level. It's a shame the DB can't figure this out for you.
- yccs27 4y agoYeah, it seems like it would be possible for the DB engine to aggregate all these increments into one update. If you have two increments by one each in the queue, why not make it a single increment by two? I'm not sure though how much computing power it would need to figure that out...
- LesZedCB 4y agowouldn't that break the atomic and isolated rule of ACID?
- samatman 4y agoNot necessarily. If both updates are in a single transaction then it's valid for the query planner to batch them, although that seems unlikely in the use case this table layout is designed for.
- deleted 4y ago[deleted]
- MauranKilom 4y agoNot any more than the slotted counter pattern...
- LesZedCB 4y agohow does the shape of data impact the storage applications safety contract?
- cryptonector 4y agoThe DB could figure it out IF it had monoid counter type to use as the column's type.