MySQL Forums
Forum List  »  General

record count increases after converting database?
Posted by: Robert Wendel
Date: April 26, 2017 06:28AM

Hello everybody,

I just needed to convert my INNODB tables from latin1_swedish_ci to "utf8mb4_unicode_ci" so that I can save hebrew characters.

I did that by executing this for all my tables:

ALTER DATABASE dbname CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE tablename DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

I checked the number of data records of my database in phpmyadmin before I started the conversion (6,6 million records) and afterwards I had 6,9 million records. Where did the 300,000 records (21 megabytes) come from?
Is it because 1 character now is saved with 4 bytes? But that wouldn't increase the record count.

Can someone explain it to me?
Thank you,
Robert

Options: ReplyQuote


Subject
Written By
Posted
record count increases after converting database?
April 26, 2017 06:28AM


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.