Re: TSearch2 performance issue?
От | Teodor Sigaev |
---|---|
Тема | Re: TSearch2 performance issue? |
Дата | |
Msg-id | 4250E9A8.5090105@sigaev.ru обсуждение исходный текст |
Ответ на | Re: TSearch2 performance issue? (Christopher Kings-Lynne <chriskl@familyhealth.com.au>) |
Список | pgsql-hackers |
Some thing like instead of static int comparedict(const void *a, const void *b) { return ((DictInfo *) a)->dict_id - ((DictInfo *) b)->dict_id; } now used static int comparedict(const void *a, const void *b) { if ( ((DictInfo *) a)->dict_id == ((DictInfo *) b)->dict_id ) return 0; return ( ((DictInfo*) a)->dict_id < ((DictInfo *) b)->dict_id ) ? -1 : 1; } It works for small dict_id ( dict_id has type Oid ), but it was errnous for dict_id>2^31. Christopher Kings-Lynne wrote: > Hi Teodor, > > What exactly did you fix here? > > Chris > > Teodor Sigaev wrote: > >> I found several unpleasant blot in comparing functions and commit >> changes to 7.4, 8.0 and head. Pls check (it need just to recompile .so >> file) >> >> Christopher Kings-Lynne wrote: >> >>>> It's cached. This select should run only one time per connection for >>>> each used dictionary. If its'not then it's a bug. I'll check it. >>> >>> >>> >>> >>> It probably is then - although I do use a persistent connection pool, >>> but I wouldn't have thought that'd use more than a new connection >>> every once in a while? >>> >>> Chris >> >> >> -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/
В списке pgsql-hackers по дате отправления: