[postgis-devel] Costing 3.0 Functions

Raúl Marín Rodríguez rmrodriguez at carto.com
Tue Sep 11 02:16:52 PDT 2018


I have something similar listed for the code sprint, so +1. Anything that
helps towards faster plans is nice.

This low costing also has some bad interaction with indexes. Since gist
indexes don't currently have parallel scans, the planner has to choose
between using the index and parallel plans and, with low costing, it is
favouring the index even when it's not even close to be the best option.

On Mon, Sep 10, 2018 at 11:55 PM, Regina Obe <lr at pcorp.us> wrote:
> +1
>
>
>
> From: postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf
> Of Paul Ramsey
> Sent: Monday, September 10, 2018 1:59 PM
> To: PostGIS Development Discussion <postgis-devel at lists.osgeo.org>
> Subject: [postgis-devel] Costing 3.0 Functions
>
>
>
> I’m running parallel tests against v11 today, and finding things mostly
> unchanged from v10 with the exception of proper handling of target lists
> now. In general the low costing on PostGIS functions means that mostly
> parallelism doesn’t kick in even when we probably want it. Even our low cost
> C functions are still probably costed 10x too small.
>
>
>
> In order to safely cost our functions, we have to first get a patch into
> PgSQL so that our inlining behaviour doesn’t get screwed up.  See the “What,
> Still Broken?” section of [1] for information on that.
>
>
>
> However, in anticipation of that Wondrous Day and to aid in easier testing
> for folks who do patch their PostGIS, I’d like to bring costing into
> postgis.sql.in with some new macros, to replace the current inline costing.
> We can then set the macros to suitably low values to avoid having failures
> of our inlined functions.
>
>
>
> The change would look like this one being used at Carto [2]
>
>
>
> Thoughts?
>
>
>
> P
>
>
>
>
>
> [1] https://carto.com/blog/inside/postgres-parallel/
>
> [2]
> https://github.com/CartoDB/postgis/pull/7/commits/c0b23850d0b2b1447310e3459a814b0eea380f60
>
>
>
>
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel



-- 
Raúl Marín Rodríguez
carto.com


More information about the postgis-devel mailing list