Re: sortsupport for text

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: sortsupport for text
Дата
Msg-id CAM-w4HM3717Xwq7DzXWjvkr9N7Th6HMOY4AO7yCQBr-yP_NpfQ@mail.gmail.com
обсуждение исходный текст
Ответ на sortsupport for text  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: sortsupport for text
Re: sortsupport for text
Список pgsql-hackers
On Fri, Mar 2, 2012 at 8:45 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> 12789    28.2686  libc-2.13.so             strcoll_l
> 6802     15.0350  postgres                 text_cmp

I'm still curious how it would compare to call strxfrm and sort the
resulting binary blobs. I don't think the sortsupport stuff actually
makes this any easier though. Since using it requires storing the
binary blob somewhere I think the support would have to be baked into
tuplesort (or hacked into the sortkey as an expr that was evaluated
earlier somehow).

It's a tradeoff and not an obvious one. The binary blobs are larger
and it would mean reading and copying more data around memory. But it
would mean doing the work that strcoll_l does only n times instead of
nlogn times. That might be a pretty significant gain.

--
greg


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: foreign key locks, 2nd attempt
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: foreign key locks, 2nd attempt