We had an issue in our dev environment where a procedure call timed out from the web server after 30 seconds. I traced the query and ran it manually (same params and all) from SSMS and it executed in about 2 seconds. I then ran
dbcc dropcleanbuffers dbcc freeproccache
and after that the call from the web server also completed in time just fine.
I would suspect that the same plan should be used since I was using the exact same parameters from both connections, but I'm not sure.
My question is: Can there be different plans or buffers for different connections? Or could it have been some other side effect caused by me running the above dbcc-commands?