These are chat archives for influxdata/influxdb

Jan 2015
Andrew Newdigate
Jan 25 2015 22:15
Hi folks, I'm currently investigating InfluxDB for some event analytics (for Gitter) and have been really impressed by it's capabilities, but I'm experiencing some problems trying to run Mixpanel-style retention analytics. Given a cohort of say 2000 users, I want to perform some queries on that cohort only.

There doesn't appear to be an IN clause for WHERE, so I'm joining ~2000 OR clauses in a query. Not ideal, I know, but the best I can currently do.

Something like this:

  var query = "SELECT count(distinct(userId)) FROM user_login WHERE " + {
    return 'userId = \'' + userId + '\'';
  }).join(' OR ') + ' GROUP BY time(1w)';
The query does eventually complete, but it take a very long time on my SSD Macbook Pro, about 15 minutes. Given that I want to run multiple queries, this won't really scale up for us. Can anyone suggest a workaround?
Andrew Newdigate
Jan 25 2015 22:21
(In this example, user_login contains about 1m rows)