Ik have a SSIS package which does a lookup for a WorkID in a employee_work table. The lookup is based on date and employeeID. It then inserts the correct workID in an sick leave fact-table. The lookup table has "only" 20,000 rows, it's indexed. The fact
table is about 4,000,000 rows. This is the lookup query:
select TOP(1) *
(SELECT WerkID, werk_start_KEY, ms120_obj
FROM dbo.DimMedewerker) [refTable]
WHERE [refTable].[ms120_obj] = ?
and [refTable].[werk_start_KEY] <= ?
ORDER BY [refTable].[werk_start_KEY] DESC
But whe I run the package it only processes about 35000 rows, the it takes a time, then it processes the next 35000 rows, etcetc. How can I make it go Faster? At the moment it takes about 1.5 hours
View Complete Post