I have cleaned up the code a bit and added the separation I mentioned in
a previous mail -- now we there are even three functions instead of old
ExecProcNode: one for starting leaf nodes, one for passing tuples and
one for signaling that the node has finished its job. It is all
described in execProcnode.c.
I also rewrote HashJoin without using the explicit state machine. It
seems slightly cleaner to me now...
Here are updated benchmarks:
+-----+-----------+---------+----------+
|query|reversed, s|master, s|speedup, %|
+-----+-----------+---------+----------+
|q01 |108.21 |117.88 |8.94 |
+-----+-----------+---------+----------+
|q03 |55.48 |58.805 |5.99 |
+-----+-----------+---------+----------+
|q04 |78.405 |81.86 |4.41 |
+-----+-----------+---------+----------+
|q05 |49.91 |51.18 |2.54 |
+-----+-----------+---------+----------+
|q10 |49.215 |52.61 |6.9 |
+-----+-----------+---------+----------+
|q12 |63.24 |68.505 |8.33 |
+-----+-----------+---------+----------+
|q14 |33.42 |35.31 |5.66 |
+-----+-----------+---------+----------+
As before, 24 runs were performed, median taken, scale is 40GB,
postgresql.conf is the same.
Patches are rebased, now they apply on 4dd3abe99f50.
--
Arseny Sher