I’ve done SO MANY design reviews where my first questions were “how big is the data, what are the query rates and patterns, and what is the worst-acceptible-performance”, immediately followed by a reschedule to review a much simpler design.
It’s worth mentioning that indexing is work done at insertion time (or at least in advance, outside of the query path), and it’s VERY often worth it to save resources at query time. This can be true EVEN IF it’s a bit more resources overall.
I’ve done SO MANY design reviews where my first questions were “how big is the data, what are the query rates and patterns, and what is the worst-acceptible-performance”, immediately followed by a reschedule to review a much simpler design.
It’s worth mentioning that indexing is work done at insertion time (or at least in advance, outside of the query path), and it’s VERY often worth it to save resources at query time. This can be true EVEN IF it’s a bit more resources overall.