Hi,
Henrik Erlandsson wrote:
I am new to mySQL and have some questions:
- Will the TEXT type receive the same size >as the input or is it fixed? (If I input >1kb of text, will the db increase 1kb or >6,5kb which is the maximum of that type?)
TEXT is dynamic, but it uses only a little bit more than the data inside.
- Is the TEXT much slower than the CHAR. >If I have 254 characters in a CHAR and 254 >characters in a TEXT type, will the search >take much longer in the TEXT type. (When >searching several records).
Due its static character CHAR-Types (of maximum 256 characters or so (?)) are "more relational" than TEXT-Fields.
Add a FULLTEXT index to your fields and get satisfied.
Performance difference you have to expect first, if the filesize is oversizing the internal memory-cache size of the mysql-server. Using indexes are a good choice and you will be lucky with much MBytes
- Is the content in TEXT stored in another >way than in the CHAR? (Will any characters >stored look different, disappear or >something like that?)
I think by experience: no. Standard character sets (ASCII ...) are supported.
Look into your docs for localizing scandinavian fonts or test it with your local characters.
Regards
Ingo