Top 10 questions you need to know before optimizing the database

Source: Internet
Author: User

You may not have used the advantages of these details when optimizing your database. The following are 10 questions about your database performance. Ask yourself.

1. assume that your database does not need the ability to store special characters, especially those characters specified in the Unicode standard, have you replaced the nchar type with various applicable field types such as char in the system?

2. Are you using the smalldatetime type instead of datetime? If you do not know the differences between the two types, this is a simple introduction: The smalldatetime type can store dates from January 1, to January 1, and the datetime type extends this range to January 1. Do you need such a large scope?

3. Do you routinely use the bit type instead of the smallint type? If so, do you know the price? This may not affect your program, but the smallint type can be used to create an index, but the bit type cannot.

4. SQL Server 2000 allows null values in bit fields, which is the default value. Some people want this, and some do not.

5. How do you deal with null values in fields? The default method is to allow null values, but a better way is to disable null values and allow zero-length strings.

6. Have you thought about the maximum number of rows in a table? Have you compared the value with the size of the data page in 8060 bytes?

7. Do you make good use of standard fields? (Go to the tool> Options> standard fields in the menu)

8. Is there a timestamp field in your table? If not, do you know when this field will be useful?

9. Do your tables have block indexes? Do you know when a table should have block indexes and when it is worthless?

10. Do you use the sp _ prefix when naming stored procedures? Do you realize the impact of this on performance?

To avoid these common development problems, a good way is to use ssw SQL Auditor, which can audit more than 10 items I listed. The price of SQL Auditor is reasonable. The best thing is that you can download the test version and pay for it after 20 trial times. The SSW trial strategy attracted me, probably because I often download some trial software that restricts 14 Angel use, and forget to run it until the trial period ends.

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.