SQL Server System Optimization-optimizing indexes through execution plans (1)
A few days ago, when I moved away from Shanghai to Wenzhou, the customer's processing system was slow.Normal down 7 timesThere are a large number of online staff, and the system is running slowly, which seriously affects business operations. This has reached the point where we have been dealing with Optimization Problems and upgrading the system over the past few days. Record these optimization methods and ideas to provide you with ideas and suggestions in the future optimization system.
In the past few days, the index has been optimized through the execution plan:
1. First, you can use the dmvs performance view to view which performance problems can be optimized through indexes. First inProduction databaseRun the following query:
SQL Server Performance Analysis-SQL Execution count and logic count
View partial results (pay attention to the average time ):
Here we can see the statement execution time and execution statement. We copy an SQL statement that runs slowly. Estimate the SQL Execution Plan and view the execution plan:
Analysis: in the complex execution plan, the overhead of data searching through the RID account for 80% of the time. Let's see what data he queries through the RID.
It turns out that only workflowid data is queried through the RID. The above is to query data through index search (index seek). In this case, it is best to overwrite the index and include workflowid to the above index, which greatly improves the execution speed of the SQL statement.
Summary:
In the past few days, we have used similar methods to evaluate the use of the system, and then optimized the index to improve the speed. So far, the system performance has improved much compared with the previous one.
Continue to work ....
Http://www.zping.com/also http://technet.microsoft.com/zh-cn/magazine/cc137757.aspxgive a more detailed description.