Re: SearchCatCacheList()/SearchSysCacheList() is O(n)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SearchCatCacheList()/SearchSysCacheList() is O(n)
Дата
Msg-id 1350974.1620856165@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SearchCatCacheList()/SearchSysCacheList() is O(n)  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> It's not an individual "result" list that's the issue. In my example
> they're all exactly one element long. The problem is that CatCache->list
> has one element for each cached SearchCatCacheList() result, and that
> for every SearchCatCacheList() we linearly search through CatCache->list
> to find a match.

Ah, now I understand.  Yeah, replacing that list with a hash table might
be a good idea.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: SearchCatCacheList()/SearchSysCacheList() is O(n)
Следующее
От: David Rowley
Дата:
Сообщение: Re: Do we need to rethink how to parallelize regression tests to speedup CLOBBER_CACHE_ALWAYS?