Re: improve Chinese locale performance

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: improve Chinese locale performance
Дата
Msg-id 51ECE550.2000805@2ndquadrant.com
обсуждение исходный текст
Ответ на improve Chinese locale performance  (Quan Zongliang <quanzongliang@gmail.com>)
Ответы Re: improve Chinese locale performance  (Quan Zongliang <quanzongliang@gmail.com>)
Re: improve Chinese locale performance  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On 07/22/2013 12:17 PM, Quan Zongliang wrote:
> 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.

It might be worth looking at gcc's strcoll() implementation. See if it
performs better when you use the latest gcc, and if not try to improve
gcc's strcoll() .

I'd be interested in seeing a test case for this that shows that the
results of your new collation are exactly the same as the original
strcoll() based approach.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Adding new joining alghoritm to postgresql
Следующее
От: KONDO Mitsumasa
Дата:
Сообщение: Re: Improvement of checkpoint IO scheduler for stable transaction responses