You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafodion.apache.org by "Liu, Yuan (Yuan)" <yu...@esgyn.cn> on 2017/09/20 02:43:42 UTC

Change default varchar(n) character set utf8 to varchar(n bytes) character set utf8?

Hi there,

We have many Chinese customers who always need to use UTF8 to store Chinese characters.
As we know, the default "varchar(n) character set utf8" will use "varchar(n chars) character set utf8", which is not good for performance.

I am suggesting if we can use "varchar(n bytes) character set utf8" as default when defining column of type "varchar(n) character set utf8"?


Best regards,
Yuan


RE: Change default varchar(n) character set utf8 to varchar(n bytes) character set utf8?

Posted by "Liu, Yuan (Yuan)" <yu...@esgyn.cn>.
Hi Hans,

Thanks for your feedback.

Yes, it works.  

Best regards,
Yuan

-----Original Message-----
From: Hans Zeller [mailto:hans.zeller@esgyn.com] 
Sent: Wednesday, September 20, 2017 11:18 AM
To: dev@trafodion.incubator.apache.org
Subject: RE: Change default varchar(n) character set utf8 to varchar(n bytes) character set utf8?

Hi Yuan,

This feature already exists, I think. You can set the following:

cqd TRAF_COL_LENGTH_IS_CHAR 'OFF';

and that should make n BYTES the default behavior. I only did a quick test, and it seems to work. You can set this in the system defaults table to make it the default for the entire system.

Thanks,

Hans

-----Original Message-----
From: Liu, Yuan (Yuan) [mailto:yuan.liu@esgyn.cn] 
Sent: Tuesday, September 19, 2017 7:44 PM
To: dev@trafodion.incubator.apache.org
Subject: Change default varchar(n) character set utf8 to varchar(n bytes) character set utf8?

Hi there,

We have many Chinese customers who always need to use UTF8 to store Chinese characters.
As we know, the default "varchar(n) character set utf8" will use "varchar(n chars) character set utf8", which is not good for performance.

I am suggesting if we can use "varchar(n bytes) character set utf8" as default when defining column of type "varchar(n) character set utf8"?


Best regards,
Yuan


RE: Change default varchar(n) character set utf8 to varchar(n bytes) character set utf8?

Posted by Hans Zeller <ha...@esgyn.com>.
Hi Yuan,

This feature already exists, I think. You can set the following:

cqd TRAF_COL_LENGTH_IS_CHAR 'OFF';

and that should make n BYTES the default behavior. I only did a quick test, and it seems to work. You can set this in the system defaults table to make it the default for the entire system.

Thanks,

Hans

-----Original Message-----
From: Liu, Yuan (Yuan) [mailto:yuan.liu@esgyn.cn] 
Sent: Tuesday, September 19, 2017 7:44 PM
To: dev@trafodion.incubator.apache.org
Subject: Change default varchar(n) character set utf8 to varchar(n bytes) character set utf8?

Hi there,

We have many Chinese customers who always need to use UTF8 to store Chinese characters.
As we know, the default "varchar(n) character set utf8" will use "varchar(n chars) character set utf8", which is not good for performance.

I am suggesting if we can use "varchar(n bytes) character set utf8" as default when defining column of type "varchar(n) character set utf8"?


Best regards,
Yuan