0

I have a stored procedure in SQL Server 2005 that is very quick when executed in Management Studio when connected using Windows Authentication. The query processes a vast amount of data and takes approx 2 seconds.

However, when I open Management Studio but connected as a SQL Server login account instead and execute the same stored procedure it takes nearly 15 seconds to complete.

I am also seeing the same slow query execution when connecting and running the stored procedure from an ASP.net application running on the same machine as the database.

Does anyone know what the issue may be ?

I've tried using WITH RECOMPILE and SET ARITHABORT ON and OFF to no effect.

Thanks,

Chris

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Chris
  • 13
  • 1
  • 4
  • 2
    Please post both execution plans. – Martin Smith Aug 23 '12 at 12:23
  • How can I get the full execution plan of each query. At the moment management studio says it's reached it's limit for displaying the execution plan and I can only save each individual execution plan which would take me ages to do. Is there a quick way that I can get the full execution plan ? Thanks. – Chris Aug 23 '12 at 12:37
  • That appears to be the connection settings, answered here: http://stackoverflow.com/questions/2736638/sql-query-slow-in-net-application-but-instantaneous-in-sql-server-management-st – Jimbo Aug 23 '12 at 12:45

0 Answers0