aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeLockRows.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-01-08 13:58:15 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2014-01-08 13:58:37 -0500
commite6336b8b5772b9856d65ef967e0b9f748f0f7b0b (patch)
tree7b903d1ad1efc87f715c555933dd0a7f73612c4f /src/backend/executor/nodeLockRows.c
parentd59ff6c110162fc6f3f62b160ff451bfda871af0 (diff)
downloadpostgresql-e6336b8b5772b9856d65ef967e0b9f748f0f7b0b.tar.gz
postgresql-e6336b8b5772b9856d65ef967e0b9f748f0f7b0b.zip
Save a few cycles in advance_transition_function().
Keep a pre-initialized FunctionCallInfoData in AggStatePerAggData, and re-use that at each row instead of doing InitFunctionCallInfoData each time. This saves only half a dozen assignments and maybe some stack manipulation, and yet that seems to be good for a percent or two of the overall query run time for simple aggregates such as count(*). The cost is that the FunctionCallInfoData (which is about a kilobyte, on 64-bit machines) stays allocated for the duration of the query instead of being short-lived stack data. But we're already paying an equivalent space cost for each regular FuncExpr or OpExpr node, so I don't feel bad about paying it for aggregate functions. The code seems a little cleaner this way too, since the number of things passed to advance_transition_function decreases.
Diffstat (limited to 'src/backend/executor/nodeLockRows.c')
0 files changed, 0 insertions, 0 deletions