Hi. I have a stored procedure that takes 7-9 seconds to run. If I run the same code as an ad hoc query it runs almost immediately. I just made a Coldfusion page where I called the stored procedure and immediately below it ran the same SQL outside the procedure. The SP call took 8266ms and the query took 47ms.Any ideas as to why this might be? I've recompiled the SP thinking that would help but it didn't. Here's the query, and thanks...CREATE PROCEDURE usp_Backend_getPossibleParentSKUsForSKU@subordinateSKUID integer,@when datetimeASif (isDate(@when) = 0) set @when = getDate()SELECT Subcategory.SubcategoryName, SKU.SKUID as parentSKUID, SKU.SKU as parentSKU, SKU.ColorFROM SubCategory left join SKU on Subcategory.subcategoryID = SKU.SubcategoryIDwhere subcategory.Subordinate = 0 and subcategory.time_validFrom <= @when and subcategory.time_validTo >= @when and SKU.time_validFrom <= @when and SKU.time_validTo >= @when and subcategory.manufacturerID in ( select manufacturerID from subcategory left join SKU on subcategory.subcategoryID = SKU.subcategoryID where SKU.SKUID = @subordinateSKUID and subcategory.time_validFrom <= @when and subcategory.time_validTo >= @when and SKU.time_validFrom <= @when and SKU.time_validTo >= @when ) and SKU.SKUID not in (select distinct parentSKUID from subordinate where subordinateSKUID = @subordinateSKUID and time_validFrom <= @when and time_validTo >= @when)order by subcategory.subcategoryName, SKU.color, SKU.SKUGO