The analysis of 28,000 results suggests that hardly anybody gets indexes right
use-the-index-luke.com
use-the-index-luke.com
Spoilers below.
Leaving some whitespace, since my eyes always glance further than I've processed, like spoiler warnings.
The last question was between "does it do WHERE first or GROUP BY first?" In real life I'd realize the problem and google the answer. I don't think it's that bad if you got that answer wrong, so long as you realized that there's something that could make a difference that you should google.
Kind of the same issue as with school: in real life you'd ask a coworker if you don't know the answer on a test. In school you can't just look it up. Silly system.
DBAs may not be valuable for day-to-day work at most companies with the prevalence of RDS and similar hosted DB offerings, but they are still invaluable resources for periodic checkins.
Complete side note, but some of the defaults for MySQL RDS instances are silly. They're inconsistent in what size of instance they target, and don't follow best practices. Drives me batty.
Right, it is "indices", not "indexes" :)
Both is acceptable.
On the other hand, for fulltext systems like Solr, indexes are trivial to set up and performance is usually impressive, even if you never use any fulltext features!
For many many uses, SQL is a poor fit, you're much better to stick to NoSQL or full text searches.
Also: Everything you knew about database normalization is SLOW.