Re: Sequential vs. random values - number of pages in B-tree

Поиск
Список
Период
Сортировка
От Ilya Kazakevich
Тема Re: Sequential vs. random values - number of pages in B-tree
Дата
Msg-id 006201d1f948$1ebd9ec0$5c38dc40$@JetBrains.com
обсуждение исходный текст
Ответ на Sequential vs. random values - number of pages in B-tree  (pinker <pinker@onet.eu>)
Список pgsql-general
Hi,

>What's the reason that postgres needs more index pages to store random
>data
>than sequential ones?

I assume that is because B-Tree is self-balanced tree, so it needs to be
rebalanced after each insertion.
Random insertions may go to the head of index where no space left leading to
huge data moving.
https://en.wikipedia.org/wiki/B-tree#Insertions_and_deletions



Ilya Kazakevich

JetBrains
http://www.jetbrains.com
The Drive to Develop



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: PGPASSWORD - More than one in a bash script
Следующее
От: pinker
Дата:
Сообщение: Re: Sequential vs. random values - number of pages in B-tree