What happens column with Text filed type?

Hi all,
I used Text field for one column in my table…
If i leave that column as blank… how much memory it occupies…
If i insert only 200 chars in this column… how much memory it occupies…
Means by default, it occupies the maximum size of text field or how much data we inserted?

I want the details for this TEXT field…

Thanking you…

let :google: be your friend

Have a look at this to calculate your storage requirements

Earlier i read that tutorial…

But they are not specified the details when i use the TEXT field with MyISAM search engine…

Give me the detailed description about TEXT field in the MyISAM search engine.

You didn’t read well. It gives the exact formula to calculate the space occupied by a text column.

Sorry,
I don’t want the size in numbers…
I want the clarification,
when i use TEXT field type for a column and i insert some data of size 2kb into taht column or left as blank, it will allocate/store only 2kb or by default 64kb?

If it left as blank, un-necessary we are wasting the 64kb or it set as NULL?

If it allocates 64kb, when the rows are increased, the table size also increased, and it will leads to exceeds maximum table size problem.

There are other links in that tutorial to info on the MyIsam engine and MyIsam table formats which might help.

:shifty:

L represents the actual length in bytes of a given string value.

BLOB, TEXT L + 2 bytes, where L < 216

So:

If the data size is 2Kb, it will store 2Kb + 2 bytes
If the data size is 0Kb, it will store 0Kb + 2 bytes

Thank you for your reply…

If the data size is 64Kb, it will store 64Kb + 2 bytes… but the maximum size is 64kb only na. At that situation what will do to overcome this problem…

Why don’t you make two test tables.
One has one field varchar(200) and you add 200 characters to one record and save
the other has one field text, and you add 200 characters to that.

Then look at the size of the two tables - is one of them about 64kb, or are both about the same size.

As a scientist, I always advocate doing the experiment rather than asking something that can be checked to very simply.

I’m back.
Check the time of my posts. I’ve done the experiment.
Your turn now.