Re: GiST "choose subtree" support function to inline penalty - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GiST "choose subtree" support function to inline penalty
Date
Msg-id 26036.1561604451@sss.pgh.pa.us
Whole thread Raw
In response to GiST "choose subtree" support function to inline penalty  (Darafei "Komяpa" Praliaskouski <me@komzpa.net>)
Responses Re: GiST "choose subtree" support function to inline penalty
List pgsql-hackers
=?UTF-8?Q?Darafei_=22Kom=D1=8Fpa=22_Praliaskouski?= <me@komzpa.net> writes:
> I'm looking at PostGIS geometry GiST index build times and try to optimize
> withing the current GiST framework. The function that shows a lot on my
> flame graphs is penalty.

> I spent weekend rewriting PostGIS penalty to be as fast as possible.
> (FYI https://github.com/postgis/postgis/pull/425/files)

> However I cannot get any meaningfully faster build time. Even when I strip
> it to "just return edge extension" index build time is the same.

TBH this makes me wonder whether the real problem isn't so much "penalty
function is too slow" as "penalty function is resulting in really bad
index splits".

It might be that giving the opclass higher-level control over the split
decision can help with both aspects.  But never start micro-optimizing
an algorithm until you're sure it's the right algorithm.

            regards, tom lane



pgsql-hackers by date:

Previous
From: yuzuko
Date:
Subject: Re: Problem with default partition pruning
Next
From: AminPG Jaffer
Date:
Subject: Cost and execution plan