Performance between stored procedure and stand alone

  • Hi there, I have a question about a simple select statement for a stored procedure which takes about 1minute and 7 second to return one record in T-SQL debugger.  However, if I take the same sql statement with the same parameter values and compiled it in a Query Analyzer window, it takes zero second for returning the same record.  Anyone has any idea where is wrong and how do I able to test it?  I tried the Profiler but not very helpful.  Thanks,

     

  • I captured the profile info by putting SET STATISTICS PROFILE ON into both my stored procedure and Query Analyzer for the sql statment.  It returns somewhat different results between the two, however, I am running the same query.  Funny!

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply