Optimize one query (with an index)