SQL Server do's and dont's excerpt

Source: Internet
Author: User
Tags sql server query
SQL Server do's and dont's

Http://www.codeproject.com/cs/database/sqldodont.asp

1. performance problems are generally optimized when they occur. However, there should be tests targeting a large amount of data to find potential performance problems.
It is difficult to determine where the performance bottleneck will occur in the actual environment at the beginning of the design. Unless it is very obvious, do not optimize "possible" performance problems during the design.

2. The index on the table accelerates the SELECT statement, but it also slows down the insert and delete statements.
Therefore, if a table is frequently queried, but few insert or delete operations are performed, some useful indexes should be added to the table.

3. Be familiar with the T-SQL on msdn.

4. Pay attention to the possible deadlock
Especially in transaction and stored procedure, you should always access different tables in the same order.

5. Do not use insert to insert a large number of values.

Should be usedDTS or BCP tool to import a large amount of data.


6. We recommend that you do not allow column to be null.
Doubt this.


7. Learn to useSQL Server Query analyzer.

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.