update query_statistics method