<char dimension with charset UTF8>
Posted by: max power
Date: November 27, 2010 03:31PM

Hi everybody,
1) I was wondering if I'd better performance in using a char instead of a tinyint, needing just to rappresent a number from 1 to 3 (or better 3 values),
Had I?

CREATE TABLE 'user'
( 'level' int );

CREATE TABLE 'user'
( 'level' char(1) );

2) I'm using the UTF-8 charset in my web pages and mysql, but while a char means 1 byte, an UTF8 char mean 3 (soon 4) bytes: is it right?
So when I use a char in my table with the UTF8 charset, mysql is occupying 3-4 bytes? Is it right?

Thanks for your replies :)



Edited 2 time(s). Last edit at 11/27/2010 03:43PM by max power.

Options: ReplyQuote


Subject
Views
Written By
Posted
<char dimension with charset UTF8>
4359
November 27, 2010 03:31PM
1563
November 28, 2010 07:06PM
1535
November 29, 2010 05:46AM
1437
November 29, 2010 09:07AM
1438
November 29, 2010 10:03AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.