Re: Thanks a lot! it works fine, but how to create index for a characterset
Posted by: Josh Chamas
Date: December 02, 2004 01:24AM

shengw1127 wrote:
> Thanks a lot! all it works fine!
>
> but it seems a little slowly, so i want to create
> index for it. how to create the index for
> specified charset?
>
> sql like that:
> select id, name_cn, name_en from gen_city order by
> Convert('name_cn' USING gbk);

I believe what you need is the correct character set + collation
and then the index built on that column will work correctly for sorting
is my understanding, so you could just store the data as gbk character
set directly instead of UTF8, but you might instead wait for the correct
collation support at the database level and then rebuild the column with that.

For now you might need to use the Convert() method here if you want to
keep your data as UTF8.

Regards,

Josh

Josh Chamas
Director, Professional Services
MySQL Inc., www.mysql.com
Get More with MySQL! http://www.mysql.com/consulting

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Thanks a lot! it works fine, but how to create index for a characterset
2938
December 02, 2004 01:24AM


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.