MySQL - why not index every field?

前端 未结 6 1965
后悔当初
后悔当初 2020-12-02 07:12

Recently I\'ve learned the wonder of indexes, and performance has improved dramatically. However, with all I\'ve learned, I can\'t seem to find the answer to this question.<

6条回答
  •  时光取名叫无心
    2020-12-02 08:14

    It is not a good idea to indexes all the columns in a table. While this will make the table very fast to read from, it also becomes much slower to write to. Writing to a table that has every column indexed would involve putting the new record in that table and then putting each column's information in the its own index table.

提交回复
热议问题