Indexes & Performance · SQL SQL
What is the primary purpose of a B-tree index on a relational database column?
Practice question from Indexes & Performance (SQL SQL), with the correct answer and a step-by-step solution.
easy · MCQ · Q-A90CC9
What is the primary purpose of a B-tree index on a relational database column?
- A.To store table rows in sorted physical order on the disk
- B.To provide logarithmic-time lookups, range scans, and ordered data retrievalCorrect answer
- C.To automatically encrypt column data for security purposes
- D.To compress duplicate values and eliminate the need for table primary keys
Solution
A B-tree index maintains a balanced tree structure that allows the database engine to locate rows efficiently, achieving search complexity, while also supporting ordered traversal for range queries (e.g., BETWEEN, >, <).
More from Indexes & Performance
- Consider a table users with columns (id SERIAL PRIMARY KEY, email VARCHAR(255), status VARCHAR(50)). If a query frequently filters by email…
- What does a 'covering index' achieve in relational database performance optimization?
- Which of the following scenarios is most likely to result in an index being ignored by the query optimizer during a SELECT query with a WHE…
- What is a partial index, and when is it most advantageous to use one?
Practise more SQL
Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.
Start practising freeFree to start · No credit card needed