Re: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale
В списке pgsql-hackers по дате отправления:
| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера