From 9f9135d129e915e72c8a2f770689fd72619ead49 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 25 Jan 2012 20:40:34 -0500 Subject: Instrument index-only scans to count heap fetches performed. Patch by me; review by Tom Lane, Jeff Davis, and Peter Geoghegan. --- src/backend/commands/explain.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/backend/commands/explain.c') diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 8b48105974f..e297e9cfb90 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -1012,6 +1012,9 @@ ExplainNode(PlanState *planstate, List *ancestors, if (plan->qual) show_instrumentation_count("Rows Removed by Filter", 1, planstate, es); + if (es->analyze) + ExplainPropertyLong("Heap Fetches", + ((IndexOnlyScanState *) planstate)->ioss_HeapFetches, es); break; case T_BitmapIndexScan: show_scan_qual(((BitmapIndexScan *) plan)->indexqualorig, -- cgit v1.2.3