SQLTeam.com | Weblogs | Forums

Assigning result set from sql statement takes over 60secs

I have this simple sql task as part of an SSIS package.
FROM Races
The result set is set to Single row.
BypassPrepare is False
The Result Name is MxDate(a date type from the sql table) and that is mapped to Variable Name User::MaxRacesDate(a datetime variable in ssis)

When I build and run the query in the Execute SQL Task Editor it takes less than 1 second.
When it runs as part of the package it takes about 90 seconds for that query to produce a result and allocate it to the user variable.
Can anyone explain why or what I could do to have it produce a result in less time.

stupid question, are you running query on the same server? when the package is running, is there something in the DB that is blocking, being blocked? How many rows in the table?