MySQL Table with TEXT column

后端 未结 6 545
太阳男子
太阳男子 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条回答
  •  情歌与酒
    2021-01-18 02:23

    The concern is that a large text field—like way over 8,192 bytes—will cause excessive paging and/or file i/o during complex queries on unindexed fields. In such cases, it's better to migrate the large field to another table and replace it with the new table's row id or index (which would then be metadata since it doesn't actually contain data).

    The disadvantages are: a) More complicated schema b) If the large field is using inspected or retrieved, there is no advantage c) Ensuring data consistency is more complicated and a potential source of database malaise.

提交回复
热议问题