use compiled query