cube.js 学习(九)cube 的pre-aggregation

我们可以使用cube的pre-aggregation 加速数据的查询,以下为一张来自官方的pre-aggregation 架构

参考架构图

pre-aggregation schema

preAggregations: {
  amountByCreated: {
    type: `rollup`,
    measureReferences: [amount],
    timeDimensionReference: createdAt,
    granularity: `month`
  }
}

参考资料

https://cube.dev/docs/caching
https://cube.dev/docs/pre-aggregations

猜你喜欢

转载自www.cnblogs.com/rongfengliang/p/10804876.html