0

Possible Duplicate:
What is the meaning of Stored procedures are “pre compile”?

I read that stored procedures in SQL Server are compiled before they are executed. AFAIK, a compiler is used to translating high-level language into machine language or some kind of intermediate language (such as .NET IL code). So I am wondering what does SQL Server compiler do? What is a stored procedure compiled into?

Thanks.

Community
  • 1
  • 1
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
  • 1
    you have the word 'wikipedia' in your username, but show a distinct lack of interest in using said resource! :) – Mitch Wheat Aug 08 '11 at 01:11

1 Answers1

2

Compiling a query is the process of creating an Execution Plan. Compiled execution plans are cached and re-used every time a query executes.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Alex_L
  • 2,658
  • 1
  • 15
  • 13