only log a query once