Phil Longstaff wrote:

Well, as I originally said, I can use a TEXT type which allows up to 64K byte strings. Although not unlimited, I assume this is long enough for everyone's purposes. MySQL stores them as 2byte length + chars. I will need to check that that libgda has some good method of creating them. Of course, I could also just try varchar(2048) instead of varchar(50), which should also be sufficient. I assume that the db tries to optimize space so that storing a 1000 char string and storing a 1 char string in a varchar(2048) don't use the same amount of space.

Generally, the database doesn't do this - it will allocate 2048 chars, whether you use 1 char or 1000. The upside of this is that it is very quick, the downside is that it wastes a lot of space.

Unlimited or "large" text strings are optimised, only because they have to be to be stored practically.

Regards,
Graham
--

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to