Skip to content

Commit

Permalink
Update pre-aggregations.md
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov authored Jul 30, 2020
1 parent 0a11dbe commit 280bf19
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/Schema/pre-aggregations.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,3 +523,12 @@ cube(`Orders`, {
}
});
```

## Pre-aggregations Garbage Collection

When pre-aggregations are refreshed Cube.js will create new pre-aggregation table each time it's version change.
It allows to seamlessly hot swap tables for any database and even for those without DDL transactions support.
It leads to orphaned tables which need to be collected over time though.
By default Cube.js will store all content versions for 10 minutes and all structure versions for 7 days.
Then it'll retain only the most recent ones and orphaned tables are dropped from database.

0 comments on commit 280bf19

Please sign in to comment.