Avoid O(N^2) overhead in repeated nocachegetattr calls when columns of
Tom Lane <tgl@sss.pgh.pa.us>
Avoid O(N^2) overhead in repeated nocachegetattr calls when columns of a tuple are being accessed via ExecEvalVar and the attcacheoff shortcut isn't usable (due to nulls and/or varlena columns). To do this, cache Datums extracted from a tuple in the associated TupleTableSlot. Also some code cleanup in and around the TupleTable handling. Atsushi Ogawa with some kibitzing by Tom Lane.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/common/heaptuple.c | modified | +184 −9 |
| src/backend/access/heap/tuptoaster.c | modified | +5 −5 |
| src/backend/executor/execJunk.c | modified | +7 −27 |
| src/backend/executor/execQual.c | modified | +10 −33 |
| src/backend/executor/execTuples.c | modified | +107 −147 |
| src/include/access/heapam.h | modified | +3 −7 |
| src/include/executor/executor.h | modified | +3 −4 |
| src/include/executor/tuptable.h | modified | +42 −51 |