Multimedia Tools and Applications

, Volume 60, Issue 2, pp 261-275

First online:

Open Access This content is freely available online to anyone, anywhere at any time.

Dynamic optimization of queries in pivot-based indexing

  • Svein Erik BratsbergAffiliated withDepartment of Computer and Information Science, Norwegian University of Science and Technology Email author 
  • , Magnus Lie HetlandAffiliated withDepartment of Computer and Information Science, Norwegian University of Science and Technology


This paper evaluates the use of standard database indexes and query processing as a way to do metric indexing in the LAESA approach. By utilizing B-trees and R-trees as pivot-based indexes, we may use well-known optimization techniques from the database field within metric indexing and search. The novelty of this paper is that we use a cost-based approach to dynamically evaluate which and how many pivots to use in the evaluation of each query. By a series of measurements using our database prototype we are able to evaluate the performance of this approach. Compared to using all available pivots for filtering, the optimized approach gives half the response times for main memory data, but much more varied results for disk resident data. However, by use of the cost model we are able to dynamically determine when to bypass the indexes and simply perform a sequential scan of the base data. The conclusion of this evaluation is that it is beneficial to create many pivots, but to use only the most selective ones during evaluation of each query. R-trees give better performance than B-trees when utilizing all pivots, but when being able to dynamically select the best pivots, B-trees often provide better performance.


Similarity search Pivot-based indexing Database trees Optimized query processing