SQL Index establishes compliance with six major iron laws

Source: Internet
Author: User

Iron Law One: there is no free lunch, it takes a price to use an index.

Iron Law II: Do not index columns that are rarely involved in a query or that have more duplicate values.

Iron Law III: For columns that are queried by scope, it is best to index.

Iron Law four: if the table has a primary key or foreign key, it must be indexed.

Iron Law V: for some special data types, do not create an index.

Iron Law VI: An index can be integrated with a collection of Where statements.

SQL Index establishes compliance with six major iron laws

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.