improve Chinese locale performance

Поиск
Список
Период
Сортировка
От Quan Zongliang
Тема improve Chinese locale performance
Дата
Msg-id 51ECB274.2050401@gmail.com
обсуждение исходный текст
Ответы Re: improve Chinese locale performance  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
Hi hackers,

I tried to improve performance when database is Chinese.

Under openSUSE, create index on table with 54996 rows
locale=C, 140ms
locale=zh_CN, 985ms

I think the function strcoll() of Linux is too slow.
So, I made a new utf8 to GB18030 map, store Chinese order in it.
Do not call strcoll().
On my modified code, same operation, locale=zh_CN, 203ms.

My English is too bad to describe my idea.
Please find the attachment.

The users in China would like to use locale=C, because it is faster.
When need to order, they call function convert() to do.

And I found some wrong order in the locale zh_CN of Linux.

In my test under Windows, there is performance improve too.
Windows XP sp3, vm, locale=Chinese_People's Republic of China.936
original code, 343ms
modified code, 235ms

Maybe, some Asian Languages have same problem.

Regards,
Quan Zongliang


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: didier
Дата:
Сообщение: Re: Improvement of checkpoint IO scheduler for stable transaction responses
Следующее
От: didier
Дата:
Сообщение: Re: Improvement of checkpoint IO scheduler for stable transaction responses