i am going to be storing some text in a database. The text happens to be xml.
i'm only storing and reading the "blob" of text (i am not using any of the xml querying or indexing facilities).
Is there any advantage to declaring the column as xml
:
CREATE TABLE docs (pk INT PRIMARY KEY, xCol XML not null)
rather than nvarchar(max)
:
CREATE TABLE docs (pk INT PRIMARY KEY, xCol NVARCHAR(max) not null)
i figure that if i give SQL Server the hint that the text
is actually xml
, then it can apply compression for more efficient storage.
Note: The third option is for me to compress the text client-side and store the data in a varbinary(max)
blob column.