trying to speed up metric queries