Similar Items: Trade-offs in Static and Dynamic Evaluation of Hierarchical Queries