• Sean Lange (8/27/2015)


    Ed Wagner (8/27/2015)


    I'm glad I'm not the only one who notices the sp_ prefix to the procedure name and knew what it meant. 😛

    It will slow you down because SQL Server has to first check the master database for a procedure of that name. Finding none, it'll come back to the current database and look for one.

    Yeah it kind of drives me nuts to see prefixes on objects. Don't know why, I suppose it reminds me of my VB6 days which makes me shudder. The worst of that kind of thing is when you do something like create a view to replace a table and you have to name your view something like tblTableName to avoid having to rewrite tons of code. What ends up happening is you have the incorrect prefixes on stuff. I can remember some crazy things like iEmployeeID being redefined as a string and contain string data because we need to change the datatype from int to string or vice versa. The same kind of nonsense ends up in the database in large systems.

    Here is a great article discussing the sp_ prefix issue. http://sqlperformance.com/2012/10/t-sql-queries/sp_prefix

    I've seen the same thing. A table named vwJobs is just wrong and bothers me. I do, however, tend to use Hungarian notation in my code. Not database objects, just the code. I find it helps to keep me aware of data types, which can help when typing near the bottom of a 2000-line procedure.