diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 5ee3775..426d9c7 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -138,7 +138,7 @@ #include "utils/syscache.h" #include "utils/timestamp.h" #include "utils/typcache.h" - +#include "portability/instr_time.h" /* just for perf test debug */ #define DEFAULT_PAGE_CPU_MULTIPLIER 50.0 /* @@ -3348,6 +3348,12 @@ mergejoinscansel(PlannerInfo *root, Node *clause, rightmax; double selec; + /* just for perf test debug */ + instr_time comparestart, + compareuration; + + INSTR_TIME_SET_CURRENT(comparestart); + /* Set default results if we can't figure anything out. */ /* XXX should default "start" fraction be a bit more than 0? */ *leftstart = *rightstart = 0.0; @@ -3618,6 +3624,20 @@ mergejoinscansel(PlannerInfo *root, Node *clause, fail: ReleaseVariableStats(leftvar); ReleaseVariableStats(rightvar); + + { /* just for perf test debug */ + double plantime; + + INSTR_TIME_SET_CURRENT(compareuration); + INSTR_TIME_SUBTRACT(compareuration, comparestart); + plantime = INSTR_TIME_GET_DOUBLE(compareuration); + + elog(NOTICE, "mergejoinscansel() : %.*f" + "\nv0 Selectivity: left:(%.*f, %.*f), right:(%.*f, %.*f)", + 3, 1000.0 * plantime, + 17, *leftstart, 17, *leftend, + 17, *rightstart, 17, *rightend); + } }