SQL Server Performance Tuning

Source: Internet
Author: User

Because the company's project encountered database operation performance problems after going online and running, it needs not to be changedCodeIn this case, the database performance is optimized, so I found the relevant information and wrote down my experience.
1. most database performance bottlenecks are concentrated on query statements. for SQL Server, you must first use the Event Viewer to find out which SQL statements and stored procedures have performance problems. the basic operation procedure is to create a trail, enter the login account and password, and select the method to save the query results. There are two optional methods: file mode and database table mode, the latter is recommended. select SQL completed and RPC completed in the event. the filtering condition filters out the objects to be tracked.
2. Observe for a period of time, find out the statements with the largest Io and time occupation from the trace results, and analyze their execution frequency.
3. use the query analyzer to break down the execution plan of SQL statements and determine whether indexes and indexes are fully utilized during execution. normally, if the index is fully utilized, the name of the execution step will be index seek. note: When analyzing Io, You need to execute the set statistics Io on statement to open the IO analysis.
4. Based on the analysis results, add the corresponding indexes and reduce the I/O later.
5. for stored procedures, the event viewer should be used to further filter their information. If spid is used (which can be obtained through select @ spid), then the maximum cost of a statement in the stored procedure is observed, then optimize the SQL statement. The step is the same as step 3.

References:
1.

SQL Server Performance Tuning entry (graphic version)

Http://blog.joycode.com/juqiang/archive/2007/01/19/91848.aspx)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.