diff options
author | Robert Haas <rhaas@postgresql.org> | 2012-01-25 20:40:34 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2012-01-25 20:41:52 -0500 |
commit | 9f9135d129e915e72c8a2f770689fd72619ead49 (patch) | |
tree | 644c9d0a29e9ccc7b2fd21a00931d62d7bd5094c /src/backend/commands/explain.c | |
parent | 08146775acd8bfe0fcc509c71857abb928697171 (diff) | |
download | postgresql-9f9135d129e915e72c8a2f770689fd72619ead49.tar.gz postgresql-9f9135d129e915e72c8a2f770689fd72619ead49.zip |
Instrument index-only scans to count heap fetches performed.
Patch by me; review by Tom Lane, Jeff Davis, and Peter Geoghegan.
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r-- | src/backend/commands/explain.c | 3 |
1 files changed, 3 insertions, 0 deletions
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, |