Hi Trafodioneers, I have a column that need to save 1 to 100 characters. The characters may include both English characters(such as ‘a’, ‘b’..) and Chinese characters(such as ‘你’,‘我’..) So I can define the column type as varchar(100 chars) character set utf8, in that case for each character, no matter it is English or Chinese, it will take 3 bytes space. For example, ‘abc你我’ will consume 15 bytes space. So I consider to change the column type to varchar(100 bytes) character set utf8, in that case ‘abc你我’ will consume 9 bytes space. However, string with more than 34 Chinese characters can not be inserted because 34 Chinese characters will take more than 100 bytes. The worst case is to define the column type as varchar(300 bytes) character set utf8.
In general case, I think varchar(300 bytes) character set utf8 is better than varchar(100 chars) character set utf8 if not all characters are Chinese. Is that true? Best regards, Yuan