Menus

Monday, December 3, 2012

What does Precompiled mean in Sql Server?

When you execute or Run a Stored Procedure for the first time,Sql Server would go through a Five Step Process, they are

1) Parse
2) Resolve
3) Optimize
4) Compile and
5) Execute

These prepares a query that is to be executed. This would create an execution plan that Sql Server will use to retrieve the data. The execution plan will be stored in the Buffer Cache, that is a reserved memory space for Sql Server to hold the execution plan information, With stored procedures, the subsequent execution of the same procedure will by-pass the Five steps process and go straight to the Execution plan. This is called as Pre-Compiled plan.

No comments:

Post a Comment