大量查询内存使用情况

时间:2019-05-30 15:16:01

标签: influxdb

我正在尝试找到一种方法来提高下采样查询内存的效率。

当前,我的查询如下所示,执行时会导致一些很高的内存峰值:

SELECT mean("value") as "mean", min("value") as "min", max("value") as "max", mode("value") as "mode"
INTO "hour"."variables"
FROM "minute"."variables"
WHERE time > now() - 1d
AND time <= now()
GROUP BY "name", time(60m)

对于每个聚合,内存在4个单独的步骤中执行下采样查询会更有效吗?

SELECT mean("value") as "mean"
INTO "hour"."variables"
FROM "minute"."variables"
WHERE time > now() - 1d
AND time <= now()
GROUP BY "name", time(60m)
SELECT min("value") as "min"
INTO "hour"."variables"
FROM "minute"."variables"
WHERE time > now() - 1d
AND time <= now()
GROUP BY "name", time(60m)
SELECT max("value") as "max"
INTO "hour"."variables"
FROM "minute"."variables"
WHERE time > now() - 1d
AND time <= now()
GROUP BY "name", time(60m)
SELECT mode("value") as "mode"
INTO "hour"."variables"
FROM "minute"."variables"
WHERE time > now() - 1d
AND time <= now()
GROUP BY "name", time(60m)

0 个答案:

没有答案