can using a decision tree as an index for a column be more efficient than indexing B-Trees?

25 Views Asked by At

Given that the time complexity to query the database for a column using a B-Tree index is typically O(log(N)), using a decision tree model as a column index could offer better query complexity. time for the same query operations?

1

There are 1 best solutions below

0
trincot On

No, using a decision tree model as a column index will not improve the complexity. B-Trees already offer the optimal time complexity.

Each decision will have two possible outcomes, so when evaluating conditions you can reach 2 distinct records at the most, not more. So if =2, you'll have to evaluate at least conditions, which is O(log).