Upgrading from SQL Server 2000

  • I have a great deal of stored procedures and data integration that need to be optimized. All the SQL code was written for SQL Server 2000 and 2005. But now we just got off SQL Server 2000. What are some easy ways to optimize code (assuming they exist) now that SQL Server 2000 is out of the picture?

  • It is nice you can leverage some of the T-SQL improvements now that you have completely moved off 2000. However, while your perspective might be tilted towards "we just moved off 2000 to 2005" that does not affect the rules for optimizing SQL Server database code. Google "optimize sql server code" and you will find plenty of information on improvements that can be made, and things to look for in your codebase to make it better.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • 1) I hope you updated ALL statistics (index, column, etc) with a FULL SCAN immediately after upgrade. That is a MANDATORY step.

    2) Most tuning will come exactly like it did in SQL 2000 - aggregate profiler runs.

    3) It is MUCH easier to do wait stats and file IO stall analyses now, and both of those should be a primary tool to find where it hurts on a wider scale.

    4) sp_whoisactive: get it, learn all of it's goodness. it is documented inside the code and Adam Machanic did a 30-day blog post series on sqlblog.com

    5) LOTS of Dynamic Management Views to help you. There are some good books about using them for tuning. Performance Tuning with SQL Server Dynamic Management Views for example, and Troubleshooting SQL Server - A Guide for the Accidental DBA. There are numerous more advanced books too, as well as a bunch of free eBooks.

    6) Consider getting a performance tuning professional on board to give your systems and applications a review. Probably lots of low-hanging fruit can be found and fixed plus you would gain the invaluable benefit of being mentored by a guru on how to do effective tuning analysis and refactoring.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply