Re: Planning a change of representation in the planner

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Planning a change of representation in the planner
Дата
Msg-id 26603.1044628875@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Planning a change of representation in the planner  (Hannu Krosing <hannu@tm.ee>)
Список pgsql-hackers
Hannu Krosing <hannu@tm.ee> writes:
> Maybe the quicker way to avoid duplicate-element bugs (and get faster
> merges) is to keep the lists ordered, so instead of just appending the
> next int, you scan to the proper place and put it there (if it is not
> there already).

I had thought of doing that before it occurred to me to switch to a
bitmap representation, but I was always afraid to --- I think it would
be more buggy not less so.  The compiler won't give any help in catching
places where plain-list operations are applied to what should be an
ordered list.  If I change the struct type completely, then the compiler
will help me.

Also, the bitmap representation makes for a nice reduction in palloc()
traffic (typically one palloc per set, not one per set element).  That
part of the performance gain won't be there if we just change to ordered
lists.
        regards, tom lane


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

Предыдущее
От: Martin Marques
Дата:
Сообщение: Incremental backup
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: Alpha version of contrib/tsearch is available for testing