summaryrefslogtreecommitdiff
path: root/src/include/executor/instrument.h
diff options
context:
space:
mode:
authorRobert Haas2012-02-07 16:23:04 +0000
committerRobert Haas2012-02-07 16:23:04 +0000
commitaf7914c6627bcf0b0ca614e9ce95d3f8056602bf (patch)
tree23633b1c4de9e6bbbc9cea30895f8b4ee74e4c01 /src/include/executor/instrument.h
parent1631598ea204a3b05104f25d008b510ff5a5c94a (diff)
Add TIMING option to EXPLAIN, to allow eliminating of timing overhead.
Sometimes it may be useful to get actual row counts out of EXPLAIN (ANALYZE) without paying the cost of timing every node entry/exit. With this patch, you can say EXPLAIN (ANALYZE, TIMING OFF) to get that. Tomas Vondra, reviewed by Eric Theise, with minor doc changes by me.
Diffstat (limited to 'src/include/executor/instrument.h')
-rw-r--r--src/include/executor/instrument.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/executor/instrument.h b/src/include/executor/instrument.h
index 9ecb5445f38..084302e4e7e 100644
--- a/src/include/executor/instrument.h
+++ b/src/include/executor/instrument.h
@@ -31,14 +31,16 @@ typedef struct BufferUsage
/* Flag bits included in InstrAlloc's instrument_options bitmask */
typedef enum InstrumentOption
{
- INSTRUMENT_TIMER = 1 << 0, /* needs timer */
+ INSTRUMENT_TIMER = 1 << 0, /* needs timer (and row counts) */
INSTRUMENT_BUFFERS = 1 << 1, /* needs buffer usage */
+ INSTRUMENT_ROWS = 1 << 2, /* needs row count */
INSTRUMENT_ALL = 0x7FFFFFFF
} InstrumentOption;
typedef struct Instrumentation
{
/* Parameters set at node creation: */
+ bool need_timer; /* TRUE if we need timer data */
bool need_bufusage; /* TRUE if we need buffer usage data */
/* Info about current plan cycle: */
bool running; /* TRUE if we've completed first tuple */