If a blog post is 200 characters long, will varchar(6500)
only consume the space of varchar(200)
?
Will this be more efficient than using TEXT or LONGTEXT?
If a blog post is 200 characters long, will varchar(6500)
only consume the space of varchar(200)
?
Will this be more efficient than using TEXT or LONGTEXT?
TEXT is stored off the table it has reference of it only.
While
VARCHAR is stored inline with the table and usually used with less size. You can use it to max 65535 but very bad actually in terms of performance.
So that you can optimized table and queries, performance may very with DBMS. If you have variable but larger string I would suggest using TEXT
Variable-length non-Unicode character data with length of n bytes. n must be a value from 1 through 8,000. Storage size is the actual length in bytes of the data entered, not n bytes. The data entered can be 0 characters in length. The SQL-92 synonyms for varchar are char varying or character varying.
http://msdn.microsoft.com/en-us/library/aa258242%28v=sql.80%29.aspx