8000 Merge pull request #12 from CartoDB/REL_10_CARTO_inline_functions · Algunenano/postgres@2f29cfc · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f29cfc

Browse files
author
Rafa de la Torre
authored
Merge pull request postgres#12 from CartoDB/REL_10_CARTO_inline_functions
Allow SQL functions to inline in the presence of costly parameter functions
2 parents cfebe90 + bec00ee commit 2f29cfc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/backend/optimizer/util/clauses.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4545,7 +4545,7 @@ inline_function(Oid funcid, Oid result_type, Oid result_collid,
45454545
else if (usecounts[i] != 1)
45464546
{
45474547
/* Param used multiple times: uncool if expensive or volatile */
4548-
QualCost eval_cost;
4548+
// QualCost eval_cost;
45494549

45504550
/*
45514551
* We define "expensive" as "contains any subplan or more than 10
@@ -4555,10 +4555,10 @@ inline_function(Oid funcid, Oid result_type, Oid result_collid,
45554555
*/
45564556
if (contain_subplans(param))
45574557
goto fail;
4558-
cost_qual_eval(&eval_cost, list_make1(param), NULL);
4559-
if (eval_cost.startup + eval_cost.per_tuple >
4560-
10 * cpu_operator_cost)
4561-
goto fail;
4558+
// cost_qual_eval(&eval_cost, list_make1(param), NULL);
4559+
// if (eval_cost.startup + eval_cost.per_tuple >
4560+
// 10 * cpu_operator_cost)
4561+
// goto fail;
45624562

45634563
/*
45644564
* Check volatility last since this is more expensive than the

0 commit comments

Comments
 (0)
0