Refine query time