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?

  1. A.To store table rows in sorted physical order on the disk
  2. B.To provide logarithmic-time lookups, range scans, and ordered data retrievalCorrect answer
  3. C.To automatically encrypt column data for security purposes
  4. 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 O(log⁡N)O(\log N) search complexity, while also supporting ordered traversal for range queries (e.g., BETWEEN, >, <).

More from Indexes & Performance

All of Indexes & Performance

Practise more SQL

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed