Buffering GiST leaf pages too

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Buffering GiST leaf pages too
Дата
Msg-id 4E5350DB.3060209@enterprisedb.com
обсуждение исходный текст
Ответы Re: Buffering GiST leaf pages too  (Jim Nasby <jim@nasby.net>)
Список pgsql-hackers
While looking at Alexander's GiST fastbuild patch, which adds buffers to 
internal nodes to avoid random I/O during index build, it occurred to me 
that inserting the tuples to the leaf pages one at a time is quite 
inefficient too, even if the leaf pages are in cache. There's still the 
overhead of locking and WAL-logging each insertion separately. I think 
we could get a nice further speedup if we attach a small buffer (one 
block or so) to every leaf page we're currently writing tuples to, and 
update the leaf page in bulk. Conveniently, the code to insert multiple 
tuples to a page already exists in GiST code (because inserting a tuple 
sometimes splits the page into more than two parts, so you need to 
insert multiple downlinks to the parent), so this requires no changes to 
the low-level routines and WAL-logging.

Let's finish off the main fastbuild patch first, but I wanted to get the 
idea out there.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Displaying accumulated autovacuum cost
Следующее
От: daveg
Дата:
Сообщение: Re: OperationalError: FATAL: lock AccessShareLock on object 0/1260/0 is already