Tim Kane <tim.kane@xxxxxxxxx> writes: > So what is the append node actually doing, and why is it necessary? > I expect that it simply does what it says, and appends the results of those > two seq-scans. But in reality, there isnâ??t a lot to do there. While I > expect a little bit of overhead, surely it just passes the tuples straight > through to the result node and that will be that.. No? Yeah, it's not expected that that's going to cost much. I am suspicious that what you are looking at is mostly measurement overhead: during EXPLAIN ANALYZE, each plan node has to do two gettimeofday() calls per call, and there are lots of platforms where that is significant relative to the actual work done per node. You might try comparing the overall times for select count(*) from ... rather than EXPLAIN ANALYZE for these two cases. If those times are much closer together than what you're getting from EXPLAIN ANALYZE, then you've got a machine with expensive gettimeofday() and you have to take your measurements with an appropriate quantum of salt. regards, tom lane