Hi i was wondering what the performance overheads are like for single column vs multiple column indexes in terms of inserts. So for example if i have 3 single column indexes would that be better for inserts into that table as opposed to having 1 index with multiple columns. When i'm talking about performance i'm interested in raw speed.
The INSERT overhead of INDEXes is normally negligible regardless of single or multi column.
Unless writes significantly out weigh reads, always include whatever indexes are necessary to improve the performance of your queries.
In some case multiple single column indexes sufficiently boost the performance of many more queries than a single multi-column index. More often, a single multi-column index further boosts performance of a smaller set of queries.
The general rule is to consider the query performance, not the insert performance, unless you can predict or see a particular issue with inserts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With