aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-05-30 14:01:58 +0000
committerBruce Momjian <bruce@momjian.us>2006-05-30 14:01:58 +0000
commit87bd07d97989bafe63a029931a65512aca4ba531 (patch)
treef527f2a76cccc4465b1aa103847a8905b05eed42 /src/include
parent53d669e5c6fb88a85a875f5a5a4a821de1f5cda5 (diff)
downloadpostgresql-87bd07d97989bafe63a029931a65512aca4ba531.tar.gz
postgresql-87bd07d97989bafe63a029931a65512aca4ba531.zip
Make EXPLAIN sampling smarter, to avoid excessive sampling delay.
Martijn van Oosterhout
Diffstat (limited to 'src/include')
-rw-r--r--src/include/executor/instrument.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/include/executor/instrument.h b/src/include/executor/instrument.h
index e89a36f6591..fbf578d473f 100644
--- a/src/include/executor/instrument.h
+++ b/src/include/executor/instrument.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 2001-2006, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/executor/instrument.h,v 1.13 2006/03/05 15:58:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/executor/instrument.h,v 1.14 2006/05/30 14:01:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -61,17 +61,21 @@ typedef struct Instrumentation
instr_time counter; /* Accumulated runtime for this node */
double firsttuple; /* Time for first tuple of this cycle */
double tuplecount; /* Tuples emitted so far this cycle */
+ double samplecount; /* Samples collected this cycle */
/* Accumulated statistics across all completed cycles: */
double startup; /* Total startup time (in seconds) */
double total; /* Total total time (in seconds) */
double ntuples; /* Total tuples produced */
double nloops; /* # of run cycles for this node */
+ double nsamples; /* # of samples taken */
+ /* Tracking for sampling */
+ bool sampling; /* Are we sampling this iteration */
+ double nextsample; /* The next tuplecount we're going to sample */
} Instrumentation;
extern Instrumentation *InstrAlloc(int n);
extern void InstrStartNode(Instrumentation *instr);
-extern void InstrStopNode(Instrumentation *instr, bool returnedTuple);
-extern void InstrStopNodeMulti(Instrumentation *instr, double nTuples);
+extern void InstrStopNode(Instrumentation *instr, double nTuples);
extern void InstrEndLoop(Instrumentation *instr);
#endif /* INSTRUMENT_H */