Skip to content

Comment on It's not you, it's SQLparent

Comments

Looks like a good scenario for ClickHouse.

One option is to just record all the measurements with the corresponding time. Something like a table with:

  sensor_id, time, value
To align and correlate the measurements, simply round down the time to some bucket. Do something like
  SELECT toStartOfMinute(time) AS t, anyIf(value, sensor_id = 'X'), anyIf(value, sensor_id = 'Y')
  FROM measurements
  WHERE sensor_id IN ('X', 'Y')
  GROUP BY t
  ORDER BY t
Yes, I'm interested in, how it will go! milovidov@clickhouse.com

Another interesting option for correlation of measurements at uneven intervals is - using ASOF JOIN.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.