optimize metric_values query

using dates IN (<long list of values>) tends to be slower than dates BETWEEN from_date AND to_date.