>Hiya John,
>
>You may have already stated this and I missed it, but other strong arguments for stored procedures in SQL Server 7.0+ are:
>
>
The execution plan is compiled when the SP is created. A call to an SP need not be compiled.
>SP code is re-entrant. Subsequent calls to the same executing SP run faster.
If you read the SQL Server 7.0 what's new, you will see that plans are cached for standard queries and reused. As a matter of fact, plans are reused for non exact queries. So, according to the docs, the speed a SP has over an ad hoc query is about negligable.
SQL statements submitted through the ODBC SQLPrepare function and the OLE DB ICommandPrepare interface can also share plans. Simple ad hoc plans are shared as well. Prepared and ad hoc plans reuse is supported further by passing parameter markers all the way through to the database.
>SPs allow you to hide the implementation from the interface. If the schema for the database changes, the SP can be changed without having to recode application logic.
>
Isn't this also true of remote views?
Isn't changing a SP = recoding applicaiton logic?
BOb
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only