Machine-translated by Google. Questions are authored in English.
Top

Discussion

In database indexing, which scenario benefits MOST from using a B+ Tree ?

  • A.Random access only
  • B.Range queries
  • C.Small datasets
  • D.Write-heavy workloads

Answer: B

B+ trees benefit Range queries most.

In a B+ tree all keys are stored in the leaf nodes in sorted order, and the leaves are linked to one another. A range query finds the first key by descending the tree once, then reads the rest by following the leaf links, without returning to the root.

A hash index serves random point lookups as well or better. Small datasets gain little from any index, and write-heavy workloads suffer from the cost of keeping the tree balanced on every insert and delete.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.