Is varchar(MAX) always preferable?

前端 未结 4 1367
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-13 08:05

Regarding SQL Server, I understand :

  • var means the memory is lazy allocated, meaning it fits to the data exactly (on insertion).

  • <
4条回答
  •  借酒劲吻你
    2020-12-13 08:38

    Look here for a good answer:

    Should I use varchar(n) or varchar(MAX)?

    The short answer is that from a storage perspective it's the same, but from a query optimization perspective, it's better to use varchar(N).

提交回复
热议问题