I HAVE STORED PROCEDURE WHICH TAKES SEVERAL HOURS. What it does is basically import data to the database from other servers using linked query.
The stored procedure comprises of around 10 such imports using linked query and there are intermediate temp tables to clean the data.
An example of one such import is
SELECT DISTINCT a.* INTO
##Temp
FROM OPENQUERY([' + @ServerName + '],''SELECT tbp.* FROM [' + @ClientServerName + '].' + @CLIENTDBNAME + '.dbo.tbPra tbp
INNER JOIN ['+@ServerName+'].Import_Staging.dbo.' + @tmp_Phys + ' re
ON tbp.Pra_ID = Re.Pra_ID '')
I am thinking of imporoving the performance by re writing this in ssis with parallel loads.
My question is should I use stored procedures for each load since they have linked query or should I use Dataflow tasks with linked query in source tables?
If I write individual stored procedures and execute them in parallel tasks in ssis , would there be a performance improvement ?
Thanks,
Kannan
↧