MySQL Forums
Forum List  »  MyISAM

Re: why bigger index of ascii than utf8?
Posted by: 武士 小浜
Date: March 24, 2013 12:29AM

Hello Rick,

Thanks.

Perhaps, the compression of the common prefix dose not work well
for an index of multiple column with ascii charset.

I tried to turn off the index compression of the commpon prefix
using create table option: 'pack_keys=0'.
The result is bellow.

The change of the index size in the utf8 case can be understood.

But the index file in the ascii case is slightly smaller than
the case without 'pack_keys' option!!


==============
result
==============
pid,pcode index (default) (previous mail)
-rw-rw---- 1 mysql mysql 2350080 Mar 21 11:06 TESTT_ASCII_test1.MYI
-rw-rw---- 1 mysql mysql 852992 Mar 21 11:06 TESTT_UTF8_test1.MYI

pid,pcode index(pack_keys=1)
-rw-rw---- 1 mysql mysql 2350080 Mar 24 13:30 2013 TESTT_ASCII_test1.MYI
-rw-rw---- 1 mysql mysql 852992 Mar 24 13:30 2013 TESTT_UTF8_test1.MYI

pid,pcode index(pack_keys=0)
-rw-rw---- 1 mysql mysql 2216960 Mar 24 13:29 2013 TESTT_ASCII_test1.MYI
-rw-rw---- 1 mysql mysql 4769792 Mar 24 13:29 2013 TESTT_UTF8_test1.MYI


pcode-only index (default)
-rw-rw---- 1 mysql mysql 954368 Mar 24 13:17 2013 TESTT_ASCII_test1.MYI
-rw-rw---- 1 mysql mysql 954368 Mar 24 13:17 2013 TESTT_UTF8_test1.MYI

pcode-only index(pack_keys=1)
-rw-rw---- 1 mysql mysql 954368 Mar 24 13:33 2013 TESTT_ASCII_test1.MYI
-rw-rw---- 1 mysql mysql 954368 Mar 24 13:33 2013 TESTT_UTF8_test1.MYI

pcode-only index(pack_keys=0)
-rw-rw---- 1 mysql mysql 1764352 Mar 24 13:32 2013 TESTT_ASCII_test1.MYI
-rw-rw---- 1 mysql mysql 4186112 Mar 24 13:32 2013 TESTT_UTF8_test1.MYI


==============

When the pcode-only index, it seems the index compression does work for
the both case of ascii and utf8.

I tried 'latin1' rather than 'ascii'.
All of results is exactly same as ascii.

Kohama

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: why bigger index of ascii than utf8?
1505
March 24, 2013 12:29AM


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.