(Multi-level index: see click here )
(age, salary (in $1,000)) A(25,60) D(45,60) G(50,75) J(50,100) B(50,120) E(70,110) H(85,140) K(30,260) C(25,400) F(45,350) I(50,275) L(60,260)
Example:
Explanation:
Note:
35 ≤ age ≤ 50 50K ≤ salary ≤ 100
Solution:
Then scan the index until salary > 100K
BUT:
If abs( x' - x ) ≥ distance(current nearest neighbor), you do not need to search that subtree !!!