Re: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale
Дата
Msg-id 7838.1412310340@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Ответы Re: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale
Список pgsql-hackers
Kouhei Kaigai <kaigai@ak.jp.nec.com> writes:
> Idea-1) Put ResourceOwnerForgetBuffer() O(1) logic, instead of O(N^2).
> The source of problem come from data structure in ResourceOwnerData,
> so a straightforward way is to apply O(1) logic based on hashing,
> instead of the linear search.

I will bet that this is a dead loss for all normal usage patterns,
because queries seldom have more than a few buffers pinned.  More
than that: I do not think we should encourage coding patterns that
pin lots of buffers.  There is no way that holding pins on thousands
of buffers to do one operation is a sane design.
        regards, tom lane



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

Предыдущее
От: Kouhei Kaigai
Дата:
Сообщение: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale
Следующее
От: Claudio Freire
Дата:
Сообщение: Re: DDL Damage Assessment