What are the advantages and disadvantages of using VARCHAR vs TEXT for storing small XML documents in MySQL?

If the XML documents to be saved are always less than 64 KiB (i.e. AFAIK, VARCHAR limit), what are the pros and cons of the VARCHAR and TEXT column types for this task?

+5
source share
1 answer

The following excerpts have been extracted from MySQL docs of string types .

" . M . M 0 - 65535. VARCHAR (65 535 , ) . , utf8 , VARCHAR, utf8, 21 844 . . E.10.4," ".

MySQL VARCHAR 1 . . VARCHAR , 255 , 2 , 255 . "

TEXT:

" TEXT 65535 (216 - 1) . , . TEXT , .

M. , MySQL TEXT, , M . "

, , varchar , , thread, , MySQL - , .

- , , NoSQL, MongoDB.

+2

All Articles