MySQL Table with TEXT column

后端 未结 6 585
太阳男子
太阳男子 2021-01-18 02:08

I\'ve been working on a database and I have to deal with a TEXT field.

Now, I believe I\'ve seen some place mentioning it would be best to isolate the TEXT column fr

6条回答
  •  猫巷女王i
    2021-01-18 02:34

    The data for a TEXT column is already stored separately. Whenever you SELECT * from a table with text column(s), each row in the result-set requires a lookup into the text storage area. This coupled with the very real possibility of huge amounts of data would be a big overhead to your system.

    Moving the column to another table simply requires an additional lookup, one into the secondary table, and the normal one into the text storage area.

    The only time that moving TEXT columns into another table will offer any benefit is if there it a tendency to usually select all columns from tables. This is merely introducing a second bad practice to compensate for the first. It should go without saying the two wrongs is not the same as three lefts.

提交回复
热议问题