4 ms·
Our current system uses soft deletes, and I wish we had done a "deleted" table. The biggest downside to soft deletes for us is that it ruins the default indexes
by MrZander 4y ago
Our current system uses soft deletes, and I wish we had done a "deleted" table.
The biggest downside to soft deletes for us is that it ruins the default indexes cause every query has a !IsDeleted where clause added to it.
- layer8 4y agoWouldn’t partition indexes solve this?
- MrZander 4y agoYes, we use filtered indexes to mitigate it. It's a lot of additional boilerplate though.
- gfody 4y agothis works better if you split your whole schema into a physical and logical layer, which is a lot of boilerplate but seems like a pagni as well since physical concerns that shouldn't change logical semantics always eventually creep in. this entails at least a view with instead-of-delete triggers and making all indexes be filtered indexes for all tables so it's a lot of boilerplate.