Hacker News new | ask | show | jobs
by perrygeo 756 days ago
It's not a "stupid reason". Indexes are not free, you either pay to maintain indexes or you pay for a full table scan at query time. I for one want that control. First of all, tables < millions of rows can fit comfortably into memory and a full table scan can be perfectly fine. The "Index every possible thing" strategy can backfire horribly and cause massive inefficiencies - only to discover half the indexes aren't even getting used. Benchmark first.
1 comments

Foreign key indexes are pretty cheap. If you have a spot where that’s breaking your architecture, that might be your architecture and not the index.

And as I already said, you should be able to opt out.