[postgis-devel] PostGIS function costs
Paul Norman
penorman at mac.com
Fri May 6 12:14:18 PDT 2016
On 5/6/2016 11:10 AM, Sandro Santilli wrote:
> My concern is that the same function (say ST_Buffer) may cost very
> few cycles or a lot of cycle depending on the input (a point vs. a
> line with hundreds or thousand of vertices). I guess this is a common
> problem with variable-size types.
Not just variable size types, but functions where the cost depends on
the input. ST_Buffer(geom, 10) is much more expensive than
ST_Buffer(geom, 0), and I could probably make it an order of magnitude
more expensive with suitable parameters.
Once 9.6 lands and these parameters start to matter more, we can see if
it's best to have a cost from the low or high end of the possible range.
> I wonder if it would make sense to have the work you did packaged
> as an extention to run on the*real* data for a given database
> and tweak costs accordingly.
It's difficult to do this. It requires an idle system, a dataset that
can be entirely CPU bound, and a fair amount of time to run. Given how
few people tune the cost GUCs, I don't think this is worth it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20160506/ae06cefd/attachment.html>
More information about the postgis-devel
mailing list