Forum Discussion
Super long refresh times despite incremental refresh
- 5 months ago
Anonymous Hi!
After some more experimenting and remaking all the calculated columns, reinstalling power bi etc it now works. I also noticed during on of the tests where a refresh took 2 hours, that it completed with a warning, and that warning was referencing a table that wasn't even loaded into the model.
So seems that perhaps some metadata or other stuff had been slightly corrupted? Either way now after rebuild it's only taking 3 minutes to refresh, with the idenditcal aggregation etc...
Hi F003Yum ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Anonymous
Hi sorry for the late reply, When I check in our SnowFlake Query history, it does look like it's only sending queries for the intervals set up in the incremental settings. But there are some extra queries like the following that appear almost more often than the real query
SHOW PRIMARY KEYS IN TABLE "DB"."Schema"."Table"
SHOW COLUMNS IN TABLE "DB"."Schema"."Table"
Here's an anonymised version of the query that messes up the load time: (then as previously mentioned there's a small number of simple calcualted columns as well)
let
Source =
Snowflake.Databases(
"your_account.region.azure.snowflakecomputing.com",
"DATA_SOURCE",
[Implementation = "2.0"]
),
TargetDatabase =
Source{[Name = "TARGET_DB", Kind = "Database"]}[Data],
TargetSchema =
TargetDatabase{[Name = "TARGET_SCHEMA", Kind = "Schema"]}[Data],
FactTable =
TargetSchema{[Name = "FACT_TABLE", Kind = "Table"]}[Data],
#"Filtered on Date Range" =
Table.SelectRows(
FactTable,
each [TimePeriod] >= RangeStart
and [TimePeriod] < RangeEnd
),
#"Selected Columns" =
Table.SelectColumns(
#"Filtered on Date Range",
{
"EntityID",
"Date",
"Hour",
"TimePeriod",
"DeviceID",
"Measure1",
"Measure2",
"Measure3",
"Measure4"
}
),
#"Grouped Rows" =
Table.Group(
#"Selected Columns",
{"EntityID", "Date", "Hour", "DeviceID"},
{
{"Measure1_Per_Hour", each List.Sum([Measure1]), type nullable number},
{"Measure2_Per_Hour", each List.Sum([Measure2]), type nullable number},
{"Measure3_Per_Hour", each List.Sum([Measure3]), type nullable number},
{"Measure4_Per_Hour", each List.Sum([Measure4]), type nullable number}
}
)
in
#"Grouped Rows"
- F003Yum5 months ago
Helper I
Anonymous Hi!
After some more experimenting and remaking all the calculated columns, reinstalling power bi etc it now works. I also noticed during on of the tests where a refresh took 2 hours, that it completed with a warning, and that warning was referencing a table that wasn't even loaded into the model.
So seems that perhaps some metadata or other stuff had been slightly corrupted? Either way now after rebuild it's only taking 3 minutes to refresh, with the idenditcal aggregation etc...
- Anonymous5 months agoNot applicable
Hi F003Yum ,
Your Snowflake history shows incremental refresh is working, and the SHOW COLUMNS and SHOW PRIMARY KEYS queries are expected metadata calls. The main cause of slow or inconsistent refresh is the Table.Group step, which can break query folding and force processing to the Power BI engine. When folding is lost, each partition executes locally, increasing refresh time even with incremental refresh. To improve performance, move aggregations to Snowflake via a view or native query and verify folding using View Native Query. Keeping transformations foldable lets the source handle execution efficiently.