Influxdb 2 heatmaps

Hi,

I’m trying to make heatmap but I have problems with flux code. My data source is Influxdb 2 database with 2 columns, price and quantity.

Here is what I’m done

price=from(bucket: “mybucket”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “mymeasurement” and r[“_field”] == “price”)

quantity=from(bucket: “mybucket”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “mymeasurement” and r[“_field”] == “quantity”)

join(tables: {price: price, quantity: quantity}, on: [“_time”], method: “inner”)

I can see raw data and simple queries works like they should, but when running query for heatmap it runs indefinitely.

I’m running Influx on Rapberry Pi 3 but it should be capable for that. Anyone can help me with the code?

Hi @itm,
So querying and joining between two buckets can be quite a heavy process, especially on a PI. I believe if these items are related you could have price and quantity as part of one measurement. This would help improve performance greatly. I would also check the heatmap UI parameters and make sure they are selecting the correct column