| From: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
|---|---|
| To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | improve Chinese locale performance |
| Date: | 2013-07-22 04:17:56 |
| Message-ID: | 51ECB274.2050401@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| zhCNorder.tar.gz | application/x-gzip | 497.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | didier | 2013-07-22 04:21:33 | Re: Improvement of checkpoint IO scheduler for stable transaction responses |
| Previous Message | didier | 2013-07-22 01:26:22 | Re: Improvement of checkpoint IO scheduler for stable transaction responses |