Home Forums SQL Server 2005 Development Difference between varchar(max) and varchar(8000) RE: Difference between varchar(max) and varchar(8000)

  • The contents of Varchar(MAX), NVarchar(MAX), VarBinary(MAX), and XML fields are encoded using "Partially Length-Prefixed" (PLP in short). A PLP stream starts with total length (8 bytes), followed by current length ( 4 bytes, the length in the current packet) then followed by the actual contents. When a column contains more than one packet (the maximum packet size is 65535) can hold, a number of "PLP" streams will be sent from server to client.

    Our product is called "DB-WAN Accel", it caches/compress/decompress the query results to speed up the data transfer over wide area networks. It does not really care how big VARCHAR(MAX) columns are.

    As I said in previous post, for a column mostly stores very short strings, the overhead of Varchar(MAX) is significant.