Re: WIP: extensible enums

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WIP: extensible enums
Дата
Msg-id 25742.1287969658@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WIP: extensible enums  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: WIP: extensible enums  (Andrew Dunstan <andrew@dunslane.net>)
Re: WIP: extensible enums  (Bruce Momjian <bruce@momjian.us>)
Re: WIP: extensible enums  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 10/24/2010 08:12 PM, Tom Lane wrote:
>> This shows that the bitmapset optimization really is quite effective,
>> at least for cases where all the enum labels are sorted by OID after
>> all.  That motivated me to change the bitmapset setup code to what's
>> attached.  This is potentially a little slower at initializing the
>> cache, but it makes up for that by still marking most enum members
>> as sorted even when a few out-of-order members have been inserted.

> That's nice. It's a tradeoff though. Bumping up the cost of setting up 
> the cache won't have much effect on a creating a large index, but could 
> affect to performance of retail comparisons significantly. But this is 
> probably worth it. You'd have to work hard to create the perverse case 
> that could result in seriously worse cache setup cost.

Well, notice that I moved the caching into typcache.c, rather than
having it be associated with query startup.  So unless you're actively
frobbing the enum definition, that's going to be paid only once per
session.
        regards, tom lane


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

Предыдущее
От: Itagaki Takahiro
Дата:
Сообщение: Re: Extensions, this time with a patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Extensions, this time with a patch