Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A big set of cost changes.
I've adjusted the functions involved and reduced the cost of
_COST_LOW
and_COST_MEDIUM
to a place that makes small things less prone to parallelism. I'm talking about queries in the 10-40 ms range where a parallel plan isn't worth it.Added to that, I've reviewed (I think all) geometry functions. I've left untouched any of the ones that operate over multiple geometries (ST_Intersects, and so on) since I didn't see a good way to assign a cost to those, but for those with a single geometry I've run them mostly with huge geometries and compare between them.
The references I've taken are:
There are multiple changes based on those rules and I've also added multiple cost to functions that didn't have it. I haven't touched geographies all that much (just here and there).
Since there are many changes, I don't plan to backport this to 3.0 and only apply it to 3.1+
Reference: https://trac.osgeo.org/postgis/ticket/4490