Re: SP-GiST failing to complete SP-GiST index build

Поиск
Список
Период
Сортировка
Искать
От
Peter Geoghegan
Тема
Re: SP-GiST failing to complete SP-GiST index build
Дата
в 03:24:37
Msg-id
CAH2-Wzmp_QG+iS7v4jqa3KRwUSweN=jSEQJOzKi4SEnMiX2xfw@mail.gmail.com
Ответ на
Список
Дерево обсуждения
SP-GiST failing to complete SP-GiST index build "Jonathan S. Katz" <jkatz@postgresql.org>
Re: SP-GiST failing to complete SP-GiST index build Peter Geoghegan <pg@bowt.ie>
Re: SP-GiST failing to complete SP-GiST index build Peter Geoghegan <pg@bowt.ie>
Re: SP-GiST failing to complete SP-GiST index build Tom Lane <tgl@sss.pgh.pa.us>
Re: SP-GiST failing to complete SP-GiST index build Peter Geoghegan <pg@bowt.ie>
Re: SP-GiST failing to complete SP-GiST index build "Jonathan S. Katz" <jkatz@postgresql.org>
Re: SP-GiST failing to complete SP-GiST index build Peter Geoghegan <pg@bowt.ie>
On Sun, May 27, 2018 at 5:10 PM, Tom Lane  wrote:
> Instrumenting the test case suggests that getQuadrant pretty much always
> returns 1, resulting in a worst-case unbalanced SPGiST tree.  I think this
> is related to the fact that the test case inserts the values in increasing
> order, so that new values are always greater than existing values in the
> index.

I suspected the same. It reminded me of the weird behavior that the
Postgres qsort() sometimes exhibits.

> SPGiST is unable to rebalance its tree on the fly, so it's pretty
> well screwed in this situation.  It does finish eventually, but in about
> 50x longer than GiST.  I imagine the index's query performance would be
> equally awful.

Can you think of some way of side-stepping the issue? It's unfortunate
that SP-GiST is potentially so sensitive to input order.

-- 
Peter Geoghegan

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Peter Geoghegan
Дата:
FAQ