A 5sec SP hitting a 30sec timeout through LINQ-to-SQL
问题 I have a SP that executes in 5 seconds through SSMS When that same SP is executed through a LINQ-to-SQL excel add-in it times out after 30 seconds (simpler queries for that same SP take a long time but return results) I then changed the SP so that it reassigns all the input parameters to new local parameters inside the SP. That made the SP run in 36seconds in SSMS (so there is the reason why SSMS was so fast to begin with) So I'm guessing that SQL server isn't making use of parameter sniffing