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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SP-GiST failing to complete SP-GiST index build
Date: 2018-05-28 00:10:03
Message-ID: 1711.1527466203@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> Looks like I spoke too soon. The SP-GiST index build finished a moment
> ago. The index build took a horrifically long time for a 122 MB index,
> though.

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. 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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2018-05-28 00:24:37 Re: SP-GiST failing to complete SP-GiST index build
Previous Message Peter Geoghegan 2018-05-27 21:30:25 Re: SP-GiST failing to complete SP-GiST index build