Indexes are magic, right? Add one and magically the performance of a query improves.
Well, not really. Each index has a cost, and thoughtful multi-column indexes will go a lot further than individual indexes. Let’s dig into the details.
What an Optimizer Does
Relational databases require queries to specify what data they want returned with no specification of where that data is on disk.… Read the rest