1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-27 07:42:10 +03:00

Create a new 'MultiExecProcNode' call API for plan nodes that don't

return just a single tuple at a time.  Currently the only such node
type is Hash, but I expect we will soon have indexscans that can return
tuple bitmaps.  A side benefit is that EXPLAIN ANALYZE now shows the
correct tuple count for a Hash node.
This commit is contained in:
Tom Lane
2005-04-16 20:07:35 +00:00
parent 85eee28cec
commit d8b1bf4791
9 changed files with 121 additions and 39 deletions

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 2001-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/include/executor/instrument.h,v 1.10 2005/03/25 21:57:59 tgl Exp $
* $PostgreSQL: pgsql/src/include/executor/instrument.h,v 1.11 2005/04/16 20:07:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -60,9 +60,9 @@ typedef struct Instrumentation
/* Info about current plan cycle: */
bool running; /* TRUE if we've completed first tuple */
instr_time starttime; /* Start time of current iteration of node */
instr_time counter; /* Accumulates runtime for this node */
instr_time counter; /* Accumulated runtime for this node */
double firsttuple; /* Time for first tuple of this cycle */
double tuplecount; /* Tuples so far this cycle */
double tuplecount; /* Tuples emitted so far this cycle */
/* Accumulated statistics across all completed cycles: */
double startup; /* Total startup time (in seconds) */
double total; /* Total total time (in seconds) */
@@ -73,6 +73,7 @@ typedef struct 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 InstrEndLoop(Instrumentation *instr);
#endif /* INSTRUMENT_H */