perf: Pass arguments to RPCs called via GET directly

Previously they were passed as a JSON payload. This results in a LATERAL
join for the calling expression, which prevents LIMIT from being pushed
into the inlined function call, making some requests really slow.

Resolves #2858
This commit is contained in:
Wolfgang Walther
2024-07-09 08:29:13 +02:00
committed by Wolfgang Walther
parent 0dc1345eb4
commit ee4bfbf253
5 changed files with 59 additions and 26 deletions
+2 -2
View File
@@ -348,7 +348,7 @@ spec actualPgVersion = do
r <- request methodGet "/rpc/get_projects_below?id=3"
[planHdr] ""
liftIO $ planCost r `shouldSatisfy` (< 45.4)
liftIO $ planCost r `shouldSatisfy` (< 35.4)
it "should not exceed cost when calling setof composite proc with empty params" $ do
r <- request methodGet "/rpc/getallprojects"
@@ -360,7 +360,7 @@ spec actualPgVersion = do
r <- request methodGet "/rpc/add_them?a=3&b=4"
[planHdr] ""
liftIO $ planCost r `shouldSatisfy` (< 0.11)
liftIO $ planCost r `shouldSatisfy` (< 0.08)
context "function inlining" $ do
it "should inline a zero argument function(the function won't appear in the plan tree)" $ do