3 ms·
Claiming they have no impact besides storage is also being disingenuous. The more indexes you have, the more noticeably slow inserts have become on some of the
by ShinTakuya 7y ago
Claiming they have no impact besides storage is also being disingenuous. The more indexes you have, the more noticeably slow inserts have become on some of the tables I've worked with. Of course, this was an inherent issue with the table design (massive table with lots of columns and a lot of indexes) but sometimes you can only work with the legacy system you have.
In an ideal world with a sanely (not over the top or inadequately) normalised database I'd agree with you. But in my experience there have been times where adding an index for a rarely run query was absolutely the wrong decision.
- bartread 7y agoAnd that's fine, but you obviously did some investigation: what irks me is people trotting out this line about insert performance with no investigation. Of course, if you over-index a table, there can be some impact but in the general case that I've seen over the years that's seldom the problem.
- ShinTakuya 7y agoOh okay, I can agree with you there. But I think as a general rule, if something is done less than once a day and it's already a heavily indexed table you can probably skip the index unless it's a massive or potentially massive table. In that case it may be worth exploring alternatives.