Most efficient query to filter a large number of tag values while peforming a group by

Flux, up to this point has been left largely unoptimized, but the current focus of the Flux engineering team is optimization. What’s causing the slowdown in Flux is the compute time necessary to compare the host value for each row to the array of hosts. I’m not certain, but I don’t believe filters that use contains() are pushed down to the storage layer, so they have to pull the data into memory and operate on it there.

What version of InfluxDB/Flux are you using?