Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Enterprise
Expertise: Intermediate
Dec 19, 2000

Be Careful How You Name SQL Server Stored Procedures


When creating stored procedures in a database other then the Master database, avoid using the 'sp_' prefix. System stored procedures are the only ones that should use the 'sp_' prefix. The issue is not that naming a procedure in this manner causes errors executing the procedure, but rather it slows down execution. When a procedure is named 'sp_', SQL server first looks in the Master database to resolve where the procedure is located. If it is not in the Master database, execution time is wasted attempting to look it up. SQL Server then looks up the stored procedure name as if the object owner is 'dbo'. If the procedure is in the current working database, then it is executed.
Andrew Holliday
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap