Ifql initial observations

I had some spare time so thought I would try out the new ifql interface and see if it can help some of my raw data queries go faster. This is using ifql 0.0.4 and influxdb 1.4.2.

I tried two simple queries on a 30s range of data containing 24055 rows and about a dozen tags:

The first query takes 8-9 seconds to run. If I change count(*) to * and bring the data back, it takes 12-13s.

SELECT count(*) FROM "table" WHERE time >= '2018-01-25T00:00:00Z' AND time < '2018-01-25T00:00:30Z'"

The ifql equivalent:

q=from(db:"mydb").filter(fn: (r) => r["_measurement"] == "table" AND r["_field"] == "gauge").range(start:2018-01-25T00:00:00Z,stop:2018-01-25T00:00:30Z).group().count()

takes 40s, and removing the group().count() to bring back the raw data takes 40s as well.

So I’m happy to hear any advice on how I could modify the query, but for me, this isn’t yet ready to use, it’s about 4x slower.

Thanks for taking a look! At this point we’re still in the mode of filling out features. We’ll be looking at performance once we get a little further along. I’m guessing the group is what’s slowing down the query. I’d be curious what the performance looks like without that. In InfluxQL that’s the equivalent of doing a GROUP BY *.

Hi Paul. I tried it without the group().count() as well and it didn’t make a difference in runtime.
I expected better after reading this: https://www.influxdata.com/blog/announcing-ifql-v0-0-3/