Replace typtoout() and gettypelem() with a single routine,
Tom Lane <tgl@sss.pgh.pa.us>
Replace typtoout() and gettypelem() with a single routine, so that fetching an attribute value needs only one SearchSysCacheTuple call instead of two redundant searches. This speeds up a large SELECT by about ten percent, and probably will help GROUP BY and SELECT DISTINCT too.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/common/printtup.c | modified | +43 −46 |
| src/backend/executor/nodeGroup.c | modified | +7 −7 |
| src/backend/executor/nodeUnique.c | modified | +10 −9 |
| src/backend/executor/spi.c | modified | +6 −6 |
| src/backend/libpq/be-dumpdata.c | modified | +6 −7 |
| src/include/access/printtup.h | modified | +2 −3 |