4 ms·
I don't know the specifics (obviously) but this reads like creating a better index on an existing table. The gross part is (I'm guessing, obviously) that now e
by philsnow 14y ago
I don't know the specifics (obviously) but this reads like creating a better index on an existing table.
The gross part is (I'm guessing, obviously) that now each write to this data store incurs an additional write and some cpu load on the data store servers (you mentioned it was done via a trigger). But now the value of finishing the migration that you started is just recovering this extra write and cpu.
- ams6110 14y agoAnd as an aside I'd strongly advise against using triggers in almost all cases. They tend to result in systems where things happen by "magic" rather than in well understood ways. If you're tempted to write a trigger, use a stored procedure instead and invoke it explicitly.
- Joeri 14y agoIt was actually about merging half a dozen tables into one (a fancy denormalization), and at the same time precalculating some fields. We had gone as far as we could with indexes. The write volume is not a big deal because writes are rare on a reservation system.