I have a cursor that does this in it's loop:
EXEC dbo.[ProcessHostVendorItems] @ItemId = @ItemId, @VendorNo =... etc
Would it be any benefit (likely via caching query plans?) to change this to:
DECLARE @SQL = "dbo.[ProcessHostVendorItems] @ItemId = @ItemId, @VendorNo =... etc"
sp_executesql @sql
I don't think it would help much since stored procedures are faster than inline SQL normally, right? I'm just running into dev constraints on what I can/can't touch in our 'core' so, I need to make up performance where I can.
This SP is hammered in a pretty big cursor on a regular basis so, even meager performance gains would be a plus.