Home  >  Q&A  >  body text

mysql索引 - 为什么MySQL like查询是以%开头用不了索引?具体点,谢谢

为什么MySQL like查询是以%开头用不了索引?

阿神阿神2742 days ago599

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-17 15:22:10

    Think of an idiom dictionary, the kind that explains one idiom one by one.
    For example, if you want to look up , but red is not at the beginning.
    How do you check it?
    You can only turn page by page.
    Because if you look up the red letter, you will find that the red letter is the beginning word of the idiom.
    If you search in the middle, you can’t find the index, because you don’t know where this dictionary is.
    Think about it, is this true?

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 15:22:10

    The index is equivalent to a dictionary directory. You can quickly search if you know the beginning. If you don’t know the beginning, there is nothing you can do. You don’t know how to search the directory page

    reply
    0
  • Cancelreply