Difficulty: Easy
Correct Answer: Index
Explanation:
Introduction / Context:
Sorting physically rearranges records into a chosen order, but it is expensive to repeat and fixes a single order at a time. When users need multiple orderings or fast lookups by different keys, indexing provides a better, more flexible approach without reordering the base data.
Given Data / Assumptions:
Concept / Approach:
An index is an auxiliary structure (e.g., B-tree, hash) that maps key values to record locations, enabling efficient retrieval and ordering without changing the physical sequence of the base file. Multiple indexes can coexist, supporting many access patterns simultaneously. This avoids repeated global sorts while still enabling ORDER BY and selective queries to run quickly.
Step-by-Step Solution:
Verification / Alternative check:
Database documentation for CREATE INDEX emphasizes improved retrieval speed and flexibility; storage engines use indexes to satisfy ORDER BY, GROUP BY, and WHERE predicates efficiently.
Why Other Options Are Wrong:
Common Pitfalls:
Over-indexing, which increases write costs; failing to maintain statistics; not aligning indexes with query predicates, leading to unused indexes.
Final Answer:
Index
Discussion & Comments