Several scenarios for MySQL failure

Source: Internet
Author: User

1, if there is an or in the query condition, even if the condition of the query with an index will be invalidated, if you want to use or, and do not want to invalidate the index, you can only add all the columns in the OR condition index

2, like query one of the beginning is not indexed,

3. Implicit conversion will invalidate the index

For example, if the field type is varchar and indexed, but a numeric type is passed, the index is invalidated, and if the field type is int, the value is varchar, but does not affect the index

4, the query condition using the function on the index list, or on the index column using the-+ operator, will also be invalidated

5, to be continued ....

Several scenarios for MySQL failure

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.