T-SQL Performance optimization

817 views

Published on

В данном докладе мы рассмотрим основные причины, который понижают производительность нашей базы данных. Поговорим о возможных путях решения подобных проблем, а так же рассмотрим инструменты предусмотренные в SQL Server для слежения за производительностью.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

T-SQL Performance optimization

  1. 1. SQL Server performance issues and the best ways to solve themrkerimhanov@codemastersintl.com
  2. 2. Contents Hardware Resource Bottlenecks Query Design Recommendations SQL Query Performance Analysis
  3. 3. A Fixed Unit of Time Spent
  4. 4. Hardware Resource Bottlenecks Memory Disk I/O Processor Network
  5. 5. Memory Bottleneck Resolutions Optimizing application workload Allocating more memory to SQL Server Increasing system memory Changing from a 32-bit to a 64-bit processor Enabling 3GB of process space
  6. 6. Disk Bottleneck Resolutions Optimizing application workload Using a faster disk drive Adding system memory Creating multiple files and filegroups Saving Log Files to a Separate Physical Disk Partitioning Tables
  7. 7. Processor Bottleneck Resolutions Optimizing application workload Using more or faster processors Not running unnecessary software
  8. 8. Network Bottleneck Resolutions Optimizing application workload Moderating and avoiding interruptions
  9. 9. Query Design Recommendations Operate on small result sets Use indexes effectively Avoid optimizer hints Use domain and referential integrity Avoid resource-intensive queries Reduce the number of network round-trips Reduce the transaction cost Reduce using of cursors
  10. 10. SQL Query Performance Analysis SQL Profiler Performance Monitor Database Engine Tuning Advisor
  11. 11. Resources SQL Server 2008 Query Performance Tuning Distilled http://msdn.microsoft.com/ru-ru/library/ms123401.aspx http://www.sqlmag.com/content1/topic/top-10-performance-tips-for-sql- server/catpath/sql-server/page/4 http://www.codegain.com/articles/sqlservers/servermanagment/top-10-sql- server-performance-tuning-tips.aspx http://www.idera.com/Downloads/WhitePapers/Top10SQLPerf.pdf http://www.codeproject.com/Articles/37089/Top-10-steps-to-optimize-data- access-in-SQL-Server http://www.codeproject.com/Articles/34372/Top-10-steps-to-optimize-data- access-in-SQL-Server http://searchsqlserver.techtarget.com/tip/T-SQL-performance-problems- and-solutions#return http://www.dotnetheaven.com/UploadFile/skrishnasamy/SQLPerformanceT unning03112005044423AM/SQLPerformanceTunning.aspx http://msdn.microsoft.com/en-us/library/ff647793.aspx#scalenetchapt14 _topic4

×