BRIN and PageIndexDeleteNoCompact

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема BRIN and PageIndexDeleteNoCompact
Дата
Msg-id 546B6648.3000300@vmware.com
обсуждение исходный текст
Ответы Re: BRIN and PageIndexDeleteNoCompact  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
BRIN added a new function, PageIndexDeleteNoCompact(), which is like 
PageIndexMultiDelete but does not remove unused line pointers. However, 
all the callers pass it just a single offset. So the callers would 
really be more interested in efficiently squeezing out a single tuple 
from a page, like PageIndexTupleDelete() does, than a bulk operation.

PageIndexDeleteNoCompact() is not optimal for the single item case. Note 
that PageIndexMultiDelete() first checks if if the number of removed 
items is small (<= 2), and just calls PageIndexTupleDelete in a loop in 
that case.

How about replacing PageIndexDeleteNoCompact() with something more like 
PageIndexTupleDelete()? It ought to be both faster and simpler.

PS. The comment above PageIndexDeleteNoCompact says that unused items at 
the end of the array are removed. But looking at the code, I don't see 
it doing that.

- Heikki



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: proposal: plpgsql - Assert statement
Следующее
От: David Fetter
Дата:
Сообщение: Re: double counting of lines in psql