* Dumb Optimization #1:

- Add executorFunc function pointer to struct PlanState
- in ExecProcNode.c -> ExecProcNode() :
- upon first execution, set executorFunc to the function corresponding to node type
        - next calls use function pointer

Effect : removes a switch (nodeTag(node)) which otherwise executes for every tuple returned by every node
Gain :
- 4% CPU time on SELECT sum(an integer column) FROM a table of one million rows
- nil on selects returning few rows obviously

        

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to