October 21, 2009 at 8:56 am
A developer here wants to have our stored procedures prefix with 'sp_'. Some legacy SPs already have 'sp_', but in most places we use 'usp_', which differentiates between application SPs and SQL system SPs. I prefer to not use 'sp_'.
Other than homemade utility SPs placed in Master beginning with 'sp_', is there a valid reason to have applications SPs prefixed with 'sp_' ?
October 21, 2009 at 9:03 am
Prefixing procs with "sp_" causes a small but definite performance reduction. It also means that, if there's a proc in master with the same name, you can end up with problems because it can run that one instead of the one you want. Those are the reasons it's recommended that you don't do that.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 21, 2009 at 9:45 am
GSquared has the reason it's not recommended.
I have used usp or even sp (no underscore) to prefix things.
October 21, 2009 at 2:50 pm
Personally, I've never seen any value to prefixing objects with their type. Lots of people use that practice, but I've never yet run into a situation where it actually helped with anything.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply