自定义的存储过程不要以SP_开头

 
When creating your own stored procedures, you should not use the sp_ prefix, because when you execute any procedure called sp_.... then SQL Server will assume that the procedure exists in the master database, and only after it can't find the procedure there it will look in the current database. So there's a response time issue (you shouldn't waste SQL Server's precious time).  older than SQL Server 2005


SQL Server 2005:
When you excute SP_* in your database, sql server will call the sp in your database If the SP_* exists in both master and you database.

When you excute SP_* in your database, sql server will call the sp in your master database If the SP_* just exists in master database.


So please don't use the SP_ prefix in your procedures, because it may reduce the performace.
posted @ 2008-06-05 13:34  Simon.guo  阅读(209)  评论(0编辑  收藏  举报