improve Chinese locale performance - Mailing list pgsql-hackers

From Quan Zongliang
Subject improve Chinese locale performance
Date
Msg-id 51ECB274.2050401@gmail.com
Whole thread Raw
Responses Re: improve Chinese locale performance
List 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


Attachment

pgsql-hackers by date:

Previous
From: didier
Date:
Subject: Re: Improvement of checkpoint IO scheduler for stable transaction responses
Next
From: didier
Date:
Subject: Re: Improvement of checkpoint IO scheduler for stable transaction responses