Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Automatically-created indexes
SQL index best practices
Summary
11. Summary

Instruction

All right, it's time to wrap things up. First, let's review:

  1. Indexes are automatically created on primary keys and UNIQUE columns.
  2. Most databases don't automatically create indexes on foreign keys.
  3. Indexes increase the performance of SELECT statements, but they slow down INSERT, UPDATE, and DELETE statements.
  4. If you need to modify a lot of data in a table, consider first deleting all indexes and then recreating them after you modify the table.
  5. To quickly delete all data from a table that doesn't have foreign keys, use TRUNCATE TABLE.

How about a quick quiz?

Exercise

Click Next exercise to continue.