Update query stats