bevanward - Wednesday, March 21, 2018 5:22 AM
Hi Bevan,
Thanks for the idea. I suppose I could embed the separate queries into separate data sources in SSDT vs. using a view, and run those separate queries in parallel on SSDT. For various reasons, I like embedding the logic in views and using those views as a data source in SSDT where possible. But that doesn't mean I'm married to that approach, esp. for performance gains.
I've had limited success using temp tables in SSDT, but I think there are options I can use to make this possible (persistent connections). Of course, I could just create permanent tables in my database and then drop them.
Having said that, I'm quite happy with the performance gains from Eirikur's code.
I've had good success in SSDT using the Balanced Data Distributor in other jobs, but I've never used that with a view, especially with a complex view such as mine. I wonder if I could use the BDD using my current view to achieve parallel processing? One thing to consider is the BDD doesn't guarantee any order in the target table, but that shouldn't be an issue in my processing.
When I ran a single query for performance testing, it ran in 30 mins (see above post). When I ran the data load in my Dev environment overnight, the entire view / data load ran in 32 mins. So I'm wondering if splitting out the queries into parallel processes will gain me much?
Regards,
Scott