Dataset with Text or Stored Procedure

Who is online?  0 guests and 2 members
Home  »  Blogs  »  briankmcdonald  »  Dataset with Text or Stored Procedure
 
0
/5
Avg: 0/5: (0 votes)

Comments (2)

drmcclelland
drmcclelland said:
This is nitpicking, I know - but stored procedures are actually compiled the first time they are executed (not when they are created): http://msdn.microsoft.com/en-US/library/ms187926(v=SQL.100).aspx http://www.scarydba.com/2009/09/30/pre-compiled-stored-procedures-fact-or-myth/
10/3/2011
 · 
 
by
briankmcdonald
You are correct. I didn't go into the details of how or when it was stored, but the execution plan is stored upon it being executed the first time. This also includes the first time after restarting the SQL Server Service. Also, just because SQL Server has compiled it, it doesn't really mean that it will always use the query plan anyway. Of course more often than not, it will. :) A related post of mine that I posted in August, 2010 talks about Cached Query Plans and using DBCC PROCCACHE to determine what's actually being held onto. http://www.bidn.com/blogs/briankmcdonald/bidn-blog/1013/dynamic-sql-and-cached-query-plans. Thank you for the comment.
10/3/2011
 · 
 
by
  • Name:*
  • Email:*
  • Website:
Type the characters you see in the image: *
Blogs RSS Feed

briankmcdonald's latest blog posts

Blogs RSS Feed

Latest community blog posts