Replace inefficient _bt_invokestrat calls with direct calls to the
Tom Lane <tgl@sss.pgh.pa.us>
Replace inefficient _bt_invokestrat calls with direct calls to the appropriate btree three-way comparison routine. Not clear why the three-way comparison routines were being used in some paths and not others in btree --- incomplete changes by someone long ago, maybe? Anyway, this makes for a nice speedup in CREATE INDEX.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/nbtree/nbtinsert.c | modified | +101 −87 |
| src/backend/access/nbtree/nbtsearch.c | modified | +27 −57 |
| src/backend/access/nbtree/nbtsort.c | modified | +21 −88 |
| src/backend/access/nbtree/nbtstrat.c | modified | +5 −1 |
| src/backend/access/nbtree/nbtutils.c | modified | +54 −15 |
| src/backend/utils/sort/tuplesort.c | modified | +49 −30 |
| src/include/access/nbtree.h | modified | +8 −9 |