Why stored procedures are faster than independent queries?

 Stored procedures are parsed and optimized as soon as they are created or complied in the database. Compiled stored procedures are stored in the memory. Database will internally stores the execution plan of a stored procedure. When ever a stored procedure is invoked or executed same query plan will be re-used. Running independent queries means that we are sending the queries 1st to database optimizer which will create the query plan and will execute that query plan. By using the stored procedure this extra burden on the database can be reduced, which in turn will result in a better performance and faster query or process execution,

This entry was posted in . Bookmark the permalink.

Leave a reply