SQL Server, Converting NTEXT to NVARCHAR(MAX)

后端 未结 5 757
太阳男子
太阳男子 2020-12-29 13:26

I have a database with a large number of fields that are currently NTEXT.

Having upgraded to SQL 2005 we have run some performance tests on converting these to NVARC

5条回答
  •  长情又很酷
    2020-12-29 13:40

    How about running the update in batches - update 1000 rows at a time.

    You would use a while loop that increments a counter, corresponding to the ID of the rows to be updated in each iteration of the the update query. This may not speed up the amount of time it takes to update all 7 million records, but it should make it much less likely that users will experience an error due to record locking.

提交回复
热议问题