Re: Constant time insertion into highly non-unique indexes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Constant time insertion into highly non-unique indexes
Дата
Msg-id 881.1113491709@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Constant time insertion into highly non-unique  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Constant time insertion into highly non-unique  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> The move right only occurs when the page is full, so the chance of
> moving right is not 0.99^250, but 0.99, since the previous 249 inserts
> would not cause a page split.

Sure, but given that we have a full page, the probability that 250
successive insertions *all* decide to move right rather than split
that page is 0.99^250.  And it only takes one decision to split to
maintain the constant-time behavior.  So I still think your analysis
is incorrect.

> IMHO the performance figures show this to be true.

*What* performance figures?  You have shown none.  We did do performance
testing of this algorithm when we adopted it, and it worked fine ---
though as I say, I don't think we tested with any very wide keys.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Constant time insertion into highly non-unique
Следующее
От: Robert Treat
Дата:
Сообщение: Re: Interactive docs idea