I am running the following query against a source table that is 3 columns by 37,636 rows and it is taking hours to run. How might I improve the performance?
The source table is, itself, the result of a precedent query, in case that matters. The precedent queries execute in a reasonable amount of time (in minutes) but this one bogs down badly.
The source table's column names are Columns, Columns2, and Count.
let
Source = Table.Buffer(GetWordCounts),
#"Grouped Rows" = Table.Buffer(Table.Group(Source, {"Count"}, {{"AllData", each _, type table}})),
Custom1 = Table.Buffer(Table.MaxN(#"Grouped Rows","Count",10)),
#"Expanded AllData" = Table.ExpandTableColumn(Custom1, "AllData", {"Columns", "Columns2"}, {"Columns", "Columns2"})
in
#"Expanded AllData"
I tried adding Table.Buffer in a few places, as you can see, but I can't tell if it is helping or hurting.
Any ideas?