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

2018-05-27 Thread Jonathan S. Katz
> On May 27, 2018, at 8:24 PM, Peter Geoghegan wrote: > > 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

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

2018-05-27 Thread Peter Geoghegan
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

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

2018-05-27 Thread Tom Lane
Peter Geoghegan 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

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

2018-05-27 Thread Peter Geoghegan
On Sun, May 27, 2018 at 2:09 PM, Peter Geoghegan wrote: > On Sun, May 27, 2018 at 12:45 PM, Jonathan S. Katz > wrote: >> Next, see bad.sql. 1.2MM sparsely clustered rows inserted, GiST indexes >> builds in about 30s on my machine. SP-GiST does not build at

SP-GiST failing to complete SP-GiST index build

2018-05-27 Thread Jonathan S. Katz
Hi, While preparing for an upcoming presentation, I was playing around with SP-GiST indexes on tstz ranges and was having an issue where some would fail to build to completion in a reasonable time, especially compared to corresponding GiST builds. Version: PostgreSQL 10.4 on