Forum Discussion
Union and Merging Slowing Performance Terribly
Hello All,
I have a report which is using 20 SQL views and I am doing few transformations on each, then disabling their load and then creating a UNION of all 20 (the business need is in such a way that I have to have a UNION in place), the data is very small in total and loads super fast (1 minute 20 seconds avg.) when it is only for the 20 views, when it comes to the UNION it takes around 29 minutes!!! I don't get why is it doing that, I added Table.Buffer on all views even though it was not needed and I am wondering what is causing this slow performance. Also, will Table.Buffer help prior to the Table.Combine in the UNION query?
Any help would be awesome!
Thank You
11 Replies
- AnonymousNot applicable
Are you importing the entire dataset and then making transformations? If yes, then it will give you slower performance. You can write a SQL query and import the transformed data. It will give you much faster results.
- nirvana_mokshImpactful IndividualI am refrencing each view individually and navigating to that view alone and then performing the needed transformations on each view.
- quentin_vigneSolution Sage
On PowerBI, are you using Import mode or Direct Query ?
When I was using DirectQuery it was the problem, it was too slow. The solution was to import data
- Quentin
- nirvana_mokshImpactful IndividualI am using import mode for each of the 20
Views, no direct query for now.- quentin_vigneSolution Sage
Did you try not doing UNION and creating relation between tables on PowerBI ?
Else, are you using every column on your 20 tables ? I had the same issue, and creating view of my table with only the needed columns and keeping data only after 2013 solved my problem