KNN Optimization for Multi-Dimensional Data