Skip to content

Allow SQL functions to inline in the presence of costly parameter functions #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 5, 2017

Conversation

pramsey
Copy link

@pramsey pramsey commented Nov 28, 2017

Remove parameter function cost tests from the
inline() function, so that PostGIS sql language
functions will correctly inline even when they
have been decorated with higer-than-default costs.
Because the Carto 2.4 PostGIS branch does include
functions decorated with higher costs, this
patch is important to ensure that unindexed
accesses do not occur. The high cost
functions are required to induce the PgSQL
planner to parallelize spatial operations
a little more aggressively than standard
database functions.

This patch will never be applied to PgSQL core, the
real patch will probably be a more generic fix to allow
costly nodes to be cached during execution.

https://www.postgresql.org/message-id/6480.1510861492@sss.pgh.pa.us

inline() function, so that PostGIS sql language
functions will correctly inline even when they
have been decorated with higer-than-default costs.
Because the Carto 2.4 PostGIS branch does include
functions decorated with higher costs, this
patch is important to ensure that unindexed
accesses do not occur. The high cost
functions are required to induce the PgSQL
planner to parallelize spatial operations
a little more aggressively than standard
database functions.
@rafatower rafatower self-assigned this Dec 5, 2017
@rafatower rafatower merged commit 2f29cfc into REL_10_CARTO Dec 5, 2017
@rafatower rafatower deleted the REL_10_CARTO_inline_functions branch December 5, 2017 12:21
Algunenano added a commit that referenced this pull request Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants