Home > SQL Server Tips > Database Management and Administration > SQL Server performance-tuning worst practices, part 2
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE MANAGEMENT AND ADMINISTRATION

SQL Server performance-tuning worst practices, part 2


Jeremy Kadlec, Contributor
06.21.2005
Rating: -3.88- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


In late March 2005, the first installment of SQL Server Performance-Tuning worst practices was released, and people in the community responded to the article with other worst practices they have observed. In this installment, we will explore some new observations and provide recommendations as well as share some additional experiences from members in the community.

Worst practice #5: No managerial support for high performance

Observation -- One common theme I have heard from many managers and users is that systems should just work and have high performance, period. Things should run forever. My new roof will last 15 to 25 years and I do not need to do anything to it. SQL Server should be the same way. The response I have heard from frustrated IT professionals is that the organization expects things to happen "automagically" i.e., automatic and magically.

Recommendation -- In reality, nothing happens automatically, even with some sort of magic; it takes a great deal of planning, testing, integrating and maintenance by a dedicated IT team. It is imperative to gain managerial support concerning the time, resources and budget issues in order for IT to meet the business needs.

Worst practice #6: It's so complicated it turns my brain to mush

Observation -- Some solutions are far more complicated than need to be, and team members believe that the more difficult, the better. Some people even brag about building technologies that others do not understand or have never seen before.

Recommendation -- Strive for simplicity in all of your high-performance solutions. I think an IT professional has a gift if he or she is able to dissect a complex problem into a simplified solution. The icing on the cake is when it can be easily documented and communicated, and it delivers the needed performance. Sure, you can write a function that gets called by a procedure that loops through 60,000 records, creates and drops four subsequent temporary tables with 2 million rows each, then changes eight different flags that another Job will query every minute. But that doesn't mean that the same answer can't be resolved via a single set-based statement in one stored procedure. Just because you can do it, doesn't mean you should.

Worst practice #7: Lack of security

Observation -- On some systems, a number of IT team members know the System Administrator's password, have administrative rights explicitly or through Built-inAdministrators group to SQL Server. This gives them the ability to make system, DML (data manipulation language) or DDL (data definition language) changes. If a problem occurs, sometimes it is corrected without anyone knowing who made the change or what the change was that corrected the problem. This leaves many unanswered questions without a way to determine the final answer.

Recommendation -- For more reasons than just performance, it ii imperative that SQL Server security is properly administered and privileged users are accountable for their actions. If changes are made to correct an issue, they should be handled systematically and documented in response to correcting the original issue.

Worst practice #8: No performance monitoring and management tool

Observation -- Organizations know that particular systems are experiencing performance problems, but they cannot answer these simple questions:

  • What is the cause of the performance problem?
  • When is the issue occurring?
  • Who are the users that are causing the issue?
  • What tier in the application is causing the issue?
  • What application is most resource intensive?
  • Which statements require the most resources?
  • Are the systems properly configured?
  • Are the systems properly designed?
  • Has the code optimized?

Recommendation -- Organizations should invest the time, team and budget on a performance monitoring and management tool that will run on a 24/7 basis to determine a baseline, gather the necessary statistics, alert when performance thresholds are exceeded and report on performance over time.

From my first article in these worst-practices installments, I received some feedback that I would like to share with everyone in this community:

Rudy in Indiana writes that the number one worst practice in his opinion is the absence of a production DBA. Two is a developer handling DBA responsibilities. Three is no initial or continuing education. Four is no time to test DBMS software and tools.

Kyle from Michigan shares a worst practice related to putting all mission-critical databases accessed on one server and wondering why all applications are performing poorly. He also shares an experience related to custom applications with the referential integrity enforced exclusively by the application. Kyle offers this recommendation: Spend time in the design phase of the project on the database structure to build the database referential integrity to avoid orphaned data and performance degradation.

Although not directly performance-related, I want to include Joyce's worst practice of no regular database or log backups, which, in her opinion is a crime punishable by lost data and full disk drives.

Thank you to everyone in the community who shared worst practices they have observed in the field. I encourage you to continue to identify worst practices and work to correct them and to, ultimately, achieve higher performance.

Anne R. from Delaware writes: One worst practice is to put multiple databases on one 500 GB drive -- only to wonder why applications are running slowly. In a similar vein, I've seen developers create large databases (200+ GB) with tables that are 40 and 50 GB large. Putting the databases on physically separate (not partitioned) drives is far more effective than changing the RAID of the drive. We've also placed (large) single tables that are heavily used in their own filegroup on separate drives for increased performance. Someone has wrongly convinced the database-using world that as long as disks are configured RAID 10, there's no problem.


Jeremy Kadlec is the Principal Database Engineer at a href="http://www.edgewoodsolutions.com/">Edgewood Solutions, a technology services company delivering professional services and product solutions for Microsoft SQL Server. He has authored numerous articles and delivers frequent presentations at regional SQL Server Users Groups and nationally at SQL PASS. Jeremy is also the SearchSQLServer.com Performance Tuning expert. Ask him a question here.


Do you have comments on this tip? Let us know.

Rate this Tip
To rate tips, you must be a member of SearchSQLServer.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Database Management and Administration
Using traces in SQL Server Profiler
Meet compliance requirements with improved database security practices
Hardening the network and OS for SQL Server security
Securing the server and database in SQL Server
How SQL Server 2008 components impact SharePoint implementations
Troubleshooting Distributed Transaction Coordinator errors in SQL Server
Achieving high availability and disaster recovery with SharePoint databases
Clearing the Windows page file and its effect on server performance
Deploying a SQL Server virtual appliance for Microsoft Hyper-V
How to create SQL Server virtual appliances for Hyper-V

Microsoft SQL Server Performance Monitoring and Tuning
Using traces in SQL Server Profiler
SQL Server Mailbag: CALs, witnesses and unwanted changes
SQL Server Mailbag: Data restoration and DB property management
Working with IntelliSense in SQL Server 2008 Management Studio
SQL Server Mailbag: Stored procedures, triggers and SSRS reports
Troubleshooting Distributed Transaction Coordinator errors in SQL Server
Clearing the Windows page file and its effect on server performance
Optimizing SQL Server indexes –- even when they're not your indexes
Performance implications of transaction log autogrowth in SQL Server
The short course on how SQL Server really works

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
contiguity  (SearchSQLServer.com)
contiguous  (SearchSQLServer.com)
drilldown  (SearchSQLServer.com)
hashing  (SearchSQLServer.com)
hybrid online analytical processing  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



SQL Server Development - .NET, C#, T-SQL, Visual Basic
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts