USEFUL SITES :
Write for Us
What do you consider are the biggest mistakes DBAs or developers make when they write Transact-SQL code that negatively affect performance?Here are some of the items I’ve found important:
What is the best way to help identify poorly performing Transact-SQL code?First, and foremost, it is imperative that all who develop Transact-SQL code for a database have a very good understanding of the database's design. It is also a good idea to understand how SQL Server processes queries, and the simple do’s and don’ts of query design. There are a number of books, available web sites, and magazines that deal with these issues. Some of my favorite books include the Inside Microsoft SQL Server series and the SQL Server Performance Tuning series from Microsoft Press. A good understanding of these items will help eliminate problems up front and give you better ideas about how to tackle performance problems as you identify them.Microsoft offers some basic tools which can be quite helpful when query tuning. You can use Query Analyzer (QA) to examine more closely individual queries and their corresponding execution plans both through the built-in graphical execution plan facility and the textual SET SHOWPLAN_ALL options. You can also monitor query statistics with the SET STATISTICS IO command and query time with SET STATISTICS TIME.To monitor multiple SQL statements, users have available the SQL Server Profiler which can watch a database and collect information with varying levels of detail. I find that using QA is easier when tuning individual queries. When examining multiple queries, especially during testing and production, Profiler can help you collect the body of activity on the server. You can save Profiler information to a table for later reporting and interrogation. The data the Profiler collects is extremely helpful.There are some very useful statistics to look for when examining a query for a potential performance problem. These include the number of reads, writes, CPU used on the server, and the duration of the query. Most queries have a “read” component. In other words, the query must access data in one or more tables in a database to generate the requested results. The read component is one of the most useful statistics since it has a direct affect on the CPU and duration of a query. Lower the reads on a query, and you increase a server’s health.Obviously, the goal of any developer or DBA is to make sure SQL Server processes queries as quickly as possible. The more information the developer or DBA has, the easier it is to address performance issues. This is where I believe Coefficient has a clear advantage. Coefficient’s primary interest is the SQL that accesses your database. It presents this information in a clear and concise way. Users can spend a lot of time examining the output of SQL Server Profiler.This is strength of Coefficient. Performance statistics for a database are generated automatically for the developer and DBA. An overall picture is created in fully hyperlinked HTML with graphs. Not only does this save a lot of time trying to analyze thousand or millions of rows of Profiler output manually, but the information can be shared throughout an entire organization using a company’s web server or network. Coefficient provides individual query analysis, overall query statistics, and database documentation all in one. Imagine the help of being able to see a comparison of one iteration of a database release to the next. To see what’s operating more efficiently and what’s not. The documentation aspect of Coefficient is extremely helpful in following trends in database performance.