“Indexes make SELECTs faster, but they make UPDATEs slower.”
The common knowledge about indexes is true—but it's too vague for our purposes. In this chapter, we'll try to be more precise about indexes. Specifically, we'll look at these questions:
What precisely is an index?
How much does an index accelerate a SELECT?
What do you, as an application programmer, need to know about the costs, the alternatives, the work arounds, the rules, and the concepts of dealing with indexes?
The pleasant thing to note about the technology of indexing is that it's mature. Nearly all DBMSs (including the Big Eight) depend on the B-tree structure for their indexes. B-trees have been around for over 30 years, so their use is very ...