Are there disadvantages to using VARCHAR(MAX) in a table?

后端 未结 6 743
你的背包
你的背包 2020-12-10 10:33

Here is my predicament.

Basically, I need a column in a table to hold up an unknown length of characters. But I was curious if in Sql Server performance problems cou

6条回答
  •  無奈伤痛
    2020-12-10 11:10

    I just saw this article the other day. It documents a fairly minor performance lag for varchar(max) over a varchar(n) column. Probably not enough to make a difference for you. But if it does, perhaps you can use a separate table to store those few large text blocks. Your small text could stay in the main table, but you could add a flag field to tell you to look in the new table for the big ones.

提交回复
热议问题