在 BigQuery 中,我们尝试运行:
SELECT day, AVG(value)/(1024*1024) FROM (
SELECT value, UTC_USEC_TO_DAY(timestamp) as day,
PERCENTILE_RANK() OVER (PARTITION BY day ORDER BY value ASC) as rank
FROM [Datastore.PerformanceDatum]
WHERE type = "MemoryPerf"
) WHERE rank >= 0.9 AND rank <= 0.91
GROUP BY day
ORDER BY day desc;
它返回相对少量的数据。但我们收到的信息是:
Error: Resources exceeded during query execution. The query contained a GROUP BY operator, consider using GROUP EACH BY instead. For more details, please see https://developers.google.com/bigquery/docs/query-reference#groupby
是什么导致此查询失败,子查询的大小?我们可以做一些等效的查询来避免这个问题吗?
针对评论进行编辑:如果我添加 GROUP EACH BY(并删除外部 ORDER BY),则查询失败,声称 GROUP EACH BY 在这里不可并行化。