cube-js / cube-js/cube

Do PreAggregations pull complete data on every refresh interval?

Open
#10,119 1 comment 1 reaction 1 assignee Claimed by @igorlukanin View on GitHub
pre-aggregations question
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Problem**

We have introduced cube on postgres , postgres by default won't support complex aggregations without indexes and we have lots of dimensions (country,state,city,town) to plot on.

Data is too big and 3M records and we need to show near real time data.


**Related Cube.js schema**
```javascript
cube(`Cube`, {
pre_aggregations: {
dimensions:... ,
measures: .... ,
mainRollup: {
type: `rollup`,
measureReferences: [count],
dimensionReferences: [country,state,city,town],
timeDimension: order_date,
refreshKey: {
every: `2 seconds`
}
}
}
})
```

Will that execute the complete sql query on postgres on every refresh or it will execute the query that got order_date from last 2 seconds ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.