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)
Список
Дерево обсуждения
Planning a change of representation in the planner Tom Lane <tgl@sss.pgh.pa.us>
Re: Planning a change of representation in the planner Hannu Krosing <hannu@tm.ee>
Re: Planning a change of representation in the planner Tom Lane <tgl@sss.pgh.pa.us>
Hannu Krosing 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 по дате отправления
От: Teodor Sigaev
Дата: