Difficulty: Easy
Correct Answer: CREATE INDEX
Explanation:
Introduction / Context:
Indexes accelerate lookups, joins, and ordering by providing alternative access paths to data. Database designers must know the precise SQL used to create and manage indexes to balance performance and storage overhead.
Given Data / Assumptions:
Concept / Approach:
The standard DDL command is CREATE INDEX, typically of the form “CREATE INDEX idx_name ON table_name (col_list)”. Alternative phrasings such as “MODIFY INDEX” or “SET INDEX TO FILE” are not standard SQL. Altering index properties (where supported) still begins with CREATE for initial creation.
Step-by-Step Solution:
Identify the action: creation of an index, not modification.Recall standard DDL syntax: CREATE INDEX idx ON table(columns).Select the command that matches: CREATE INDEX.
Verification / Alternative check:
Vendor manuals consistently define CREATE INDEX with column lists and options (unique, include columns, storage parameters, partitions). The foundational verb is always CREATE for new indexes.
Why Other Options Are Wrong:
Common Pitfalls:
Over-indexing can slow writes; always match indexes to workload patterns and maintain statistics for the optimizer.
Final Answer:
CREATE INDEX
Discussion & Comments