Sub topic 1
Why Full Refresh Does Not Scale
Prerequisites
This chapter assumes you can do the following:
- Connect Power BI Desktop to a relational source and load a table in Import mode.
- Open Power Query and read the Applied Steps pane.
- Tell Import mode and DirectQuery mode apart.
- Identify a date or datetime column on your largest table.
What a full refresh does
In Import mode, Power BI copies source data into the model and stores it in a compressed in-memory format. A refresh repeats that copy. By default, every refresh is a full refresh. Power BI drops the old data for each table, runs the table's query against the source, and loads the whole result again.
This works well for small tables. For a fact table with hundreds of millions of rows, it wastes effort. Most of those rows are old and never change, yet each refresh reads, transfers, compresses, and stores them again.
Where the cost comes from
A full refresh pays for the entire table every time, even when only a small slice has changed. The cost shows up in several places:
- Source load. The source database scans and returns every row on each refresh.
- Network transfer. All rows travel from the source to the Power BI service, often through an on-premises data gateway.
- Processing time. The service compresses and encodes every column of every row.
- Memory. The service holds the old copy of the table while it builds the new one, so peak memory use can approach twice the table size.
- Time limits. Refreshes that run too long can hit a service timeout. The limit is two hours on shared capacity and five hours on Premium.
Check the current limits for your license in the Microsoft documentation, because they change.
Growth makes it worse
Fact tables grow. Each day adds rows, so the refresh takes a little longer than the day before. The growth is slow, so the problem tends to appear suddenly: a refresh that took 20 minutes last year now fails at the time limit.
The share of data that actually changed keeps shrinking. If you hold five years of daily sales and only the last few days can change, a full refresh reloads about 99.8 percent of its rows for no reason.
What incremental refresh changes
Incremental refresh splits a table into partitions based on a date column. A partition is a separate slice of the table that Power BI can refresh on its own. The service then refreshes only the recent partitions and leaves the older ones as they are.
The work per refresh now depends on the size of the recent window, not on the size of the whole table. A table can keep growing in history while each refresh stays about the same length.
A rough comparison
The numbers below are illustrative. They show the shape of the saving, not a benchmark.
| Scenario | Rows read per refresh | Relative work |
|---|---|---|
| Full refresh, 5 years of daily data | About 1,825 days of rows | 100% |
| Incremental refresh, last 10 days | About 10 days of rows | About 0.5% |
The saving only applies if the source can do the filtering. Power BI must send the date filter to the source, so the source returns only the requested rows. This is called query folding, and the next chapters cover it. Without folding, Power BI would still read the whole table and filter it afterward, and you would lose most of the benefit.
What you will build
The rest of this tutorial follows a fixed sequence:
- Check that the source supports query folding.
- Create the
RangeStartandRangeEndparameters. - Filter the table using those parameters.
- Define a refresh policy with an archive period and an incremental period.
- Publish the model and run the first refresh, which builds the partitions.
Exercise
A sales table holds ten years of daily rows and a full refresh takes three hours. Only the last week of data ever changes. Explain why a full refresh is wasteful here, and what determines the work per refresh after you switch to incremental refresh.
Show answer
A full refresh reloads all ten years of rows, but about 99.8 percent of them never change, so most of the source load, transfer, and processing is repeated for nothing. With incremental refresh, the table is split into date-based partitions and only the recent ones (the last week, for example) are reloaded. The work then depends on the size of the incremental window, not on the total table size, so the refresh time stays roughly stable as history grows.
Exercise
Why does incremental refresh depend on query folding to deliver its saving?
Show answer
The date filter must be sent to the source as part of the query, such as a WHERE clause, so the source returns only the rows for the partition being refreshed. If the filter does not fold, Power BI reads the whole table from the source and filters it afterward, so the refresh still does the full amount of reading and transfer.