Archive for the ‘Performance Tuning’ Category

Stored Procedure Naming Convention

Posted on November 19th, 2008 in Administering, Nuggets, Performance Tuning | No Comments »

Never use the sp_ prefix for a user-stored procedure. One reason is that it can make it hard to tell which sprocs are delivered and which are user-defined. Another is that if you prefix your sprocs with sp_, SQL searches for the prefix in the master db each time the procedure is called, before looking in the local database. Use usp_ instead.

From Microsoft eLearning Course 3595: Establishing Database Conventions and Standards for Microsoft® SQL Server™ 2005.

Performance: EXISTS vs LIKE

Posted on September 21st, 2008 in Nuggets, Performance Tuning, Querying, T-SQL | No Comments »

The EXISTS and NOT EXISTS operators can often use an index whereas the LIKE and NOT LIKE operators cause a table scan. This makes EXISTS and NOT EXISTS tend to be more efficient.

Technorati Profile