Does the database (maximum) field length affect performance?

前端 未结 2 1889
北海茫月
北海茫月 2021-01-12 18:51

At my company, we have a legacy database with various tables and therefore many, many fields.

A lot of the fields seem to have large limits (ex: NVARCHAR(MAX)

2条回答
  •  臣服心动
    2021-01-12 19:25

    Yes, the query optimizer can guess how many rows fit in a page, if you have a lot of varchar fields that are larger than necessary, SQL Server can internally guess the wrong number of rows.

提交回复
热议问题