Hacker News new | ask | show | jobs
by eighthnate 3138 days ago
> If needed you can add another index or run a subquery first, but the answer to this question can be found out in < 10seconds in the real world more quickly by testing it than even spending the time thinking about it.

This is true for some situations. But understanding indexing and databases can save you from headaches that come from structural problems. Not every query performance issue can be solved by throwing more indexes on a table and using it.

It's the idea of prophylaxis. An ounce of prevention is worth a pound of cure.

And if you are using production as a testing environment and waiting for problems in production to tweak your queries, then you probably won't last long in software development.

Indexes are the basics. Everyone should have grasp of it at the basic level.