[postgis-devel] COSTS

Paul Ramsey pramsey at cleverelephant.ca
Mon Mar 11 07:32:18 PDT 2019


Yeah, I think we’re going to be on the horns of a dilemma… we practically have to trick the planner into doing what we want…
One thing I remain unable to trick the planner into doing is a spatial join. Takes a cost of a million on ST_Intersects() to get a spatial join, on a pretty large could relations. Other stuff works, but it still takes quite high costs, like to get ST_Area to kick a parallel plan in takes a cost of 100.

What led you to feel those costs were “too high”.?

P

> On Mar 11, 2019, at 3:45 AM, Raúl Marín Rodríguez <rmrodriguez at carto.com> wrote:
> 
> Hi,
> 
> Recently I've been doing some tests with CARTO's costs in Postgis and
> found that some of the costs we had were too high in some cases (bit
> point datasets):
> - ST_Simplify: I reduced it from 512 to 64.
> - ST_Intersects: I reduced it from 512 to 128.
> 
> They are now setup with cost _COST_HIGH (10000) which seems really
> excesive, but I'll wait until I can test with PG12 + trunk to test it.
> 
> On Fri, Mar 8, 2019 at 10:54 PM Paul Ramsey <pramsey at cleverelephant.ca> wrote:
>> 
>> So, FYI for those working against PG12, I have added in costing, and upped the costs for functions in PG12 substantially. So, let’s see if (a) something breaks around planning and/or (b) parallelism improves with these new costs?
>> 
>> https://trac.osgeo.org/postgis/ticket/4344
>> 
>> The knobs for moving costs around globally are in
>> 
>> https://github.com/postgis/postgis/blob/239f2286989135b9a3156ce7789f45f09fcf0d3b/postgis/sqldefines.h.in#L24-L41
>> 
>> P.
>> _______________________________________________
>> 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
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list