LESSON 15Creating Indexes on Tables to Improve Performance

In this lesson, we talk about indexes, which provide you with a shorter route to your data. So far, you have learned how to create tables, populate tables with data, and select data from tables. Now, how can we get to data faster? By using indexes, which are objects based on data in tables. Unlike views, which we discussed during Lesson 13, indexes do indeed require physical storage. By the end of this lesson, you will understand the following:

• How to create indexes

• How to create composite indexes

• What indexes do

• When indexes should be used

• When it is better not to use an index

An index is a way of presenting data differently than the way it appears on the disk. Special types ...

Get Sams Teach Yourself SQL in One Hour a Day, Fifth 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.