HTML/Text module: ntext should be changed to nvarchar(max)
See original GitHub issueDescription of Problem
The table HtmlText still uses ntext in 2 columns - this might cause performance issues
Proposed Solution Option 1
Change ntext to nvarchar(max)
Affected version
- 9.3.0
- 9.2.2
- 9.2.1
- 9.2
- 9.1.1
- 9.1
- 9.0
Possible Issues
Just altering the type of the columns does not help. ntext is stored in the BLOB space of SQL Server, as nvarchar(max) is stored in the data space. Just altering the type of the column leaves the data in the BLOB space as long as it is not updated. New records will be written to the data space.
The solution is either to run a script like
UPDATE {databaseOwner}{objectQualifier}HtmlText SET Content = Content, Summary = Summary
after altering the type, or create a temporary table, copy the data from the original table, delete the original table and rename the temporary table. Constraints and indexes have to be rebuilt. There are also two stored procedures that are affected, these have to be altered as well. I did that in the attached file. Feel free to use it.
Module_HtmlText_Change_ntext_to_nvvarcharmax.SqlDataProvider.txt
Issue Analytics
- State:
- Created 4 years ago
- Comments:23 (14 by maintainers)
Top GitHub Comments
Done
This issue has been closed automatically due to inactivity (as mentioned 14 days ago). Feel free to re-open the issue if you believe it is still relevant.