Creating Indexes

In a relational database management system, an index is a mechanism for boosting performance. Just as an index in a book helps you quickly find the pages you want to read, an index on a column helps the system find data. When you're looking for a particular subject in a book, you don't want to read every page to find the topic of interest. Similarly, when you're searching for a given piece of data, an index can serve as a logical pointer to its physical location.

There are several important differences, however, between an index in a book and an index in a relational database management system. The reader of a book decides whether to consult the index. The user of a relational database management system decides whether to create ...

Get Practical SQL Handbook, The: Using SQL Variants, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.