A document store added for one collection of variable-shaped supplier payloads, in an application whose other forty tables are relational.
the reasons given in 2021, revisited:
"the shape varies per supplier" true, and a JSON
column handles it
"we do not want migrations" we have them anyway,
in application code,
undocumented
"it will scale better" 40k documents.
nothing is scaling.
what it costs: a second datastore to back up, monitor,
upgrade and reason about transactions across.
The migration back was two days and the payloads are now a JSON column with a generated column for the two fields we filter on. The general principle is that a second datastore has a fixed operational cost that does not shrink with usage — one collection is the worst possible ratio, and the threshold for it being right is much higher than the threshold for it seeming right.