From f1972723654947f70409716757aa83f3d93c8fab Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 22 Sep 2011 11:29:18 -0400 Subject: Make EXPLAIN ANALYZE report the numbers of rows rejected by filter steps. This provides information about the numbers of tuples that were visited but not returned by table scans, as well as the numbers of join tuples that were considered and discarded within a join plan node. There is still some discussion going on about the best way to report counts for outer-join situations, but I think most of what's in the patch would not change if we revise that, so I'm going to go ahead and commit it as-is. Documentation changes to follow (they weren't in the submitted patch either). Marko Tiikkaja, reviewed by Marc Cousin, somewhat revised by Tom --- src/backend/executor/nodeHashjoin.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/backend/executor/nodeHashjoin.c') diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index 3a6698105f2..c3c4db4bc2c 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -325,7 +325,11 @@ ExecHashJoin(HashJoinState *node) return result; } } + else + InstrCountFiltered2(node, 1); } + else + InstrCountFiltered1(node, 1); break; case HJ_FILL_OUTER_TUPLE: @@ -360,6 +364,8 @@ ExecHashJoin(HashJoinState *node) return result; } } + else + InstrCountFiltered2(node, 1); } break; @@ -397,6 +403,8 @@ ExecHashJoin(HashJoinState *node) return result; } } + else + InstrCountFiltered2(node, 1); break; case HJ_NEED_NEW_BATCH: -- cgit v1.2.3