Why Insert statements perform slower on a indexed table?
This is actually the same kind of question as:
Why does it take more time to put all my groceries in the correct place in my kitchen than leaving everything in the bags after I visited my groceries store?
This is because when storing your groceries, you want them on a nice, well known position so that it is easier to find them afterwards.
A database has to do the same.
This also means that adding more indexes will further slow down inserts.
It should be clear that you only want to create an index if you will also use it afterwards. If you only create an index and you are not using it afterwards to improve the performance of a query, there's no need to have the index as it will only slow down the inserts, and not improve any query.
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