Q&A

Q1:Does an index actually take up space the way a table does?
A1: Yes. An index takes up physical space in a database. In fact, an index can become much larger than the table for which the index was created.
Q2:If you drop an index for a batch job to complete faster, how long does it take to re-create the index?
A2: Many factors are involved, such as the size of the index being dropped, CPU usage, and the machine's power.
Q3:Should all indexes be unique indexes?
A3: No. Unique indexes allow no duplicate values. There may be a need for the allowance of duplicate values in a table.

Get Sams Teach Yourself SQL in 24 Hours, Second 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.