What are the biggest benefits of using INDEXES in mysql?

后端 未结 7 1902
无人共我
无人共我 2020-12-09 17:44

I know I need to have a primary key set, and to set anything that should be unique as a unique key, but what is an INDEX and how do I use them?

What are the benefits

7条回答
  •  忘掉有多难
    2020-12-09 18:11

    Think of it this way: what are the biggest benefits of having an index in a book? It's much the same thing. You have a slightly larger book, yet you're able to quickly look things up. When you create an index on a column, you're saying you want to be able to reference it in a where clause to look it up quickly.

提交回复
热议问题