This problem is for most of the query that is because of parameter sniffing,so some times in app it uses the correct plan as the same in SSMS,and some times it uses the bad plan because of the first parameter that creates the plan and is saved in cache.
My problem is that when in app the query has a bad plan exactly at that time with the same parameter in sql profiler,in SSMS it has the correct plan.Whay the plan is diffrent when it uses the plan for that query from cache?
I exactly run the query from sql profiler without any changes even space or capital letters.
And my query is without any option.
I dont understand what does ARITHABORT do?And what is the relation between plan and ARITHABORT?