Commit 65158f4
committed
Remove small inefficiency in ExecARDeleteTriggers/ExecARUpdateTriggers.
Whilst poking at nodeModifyTable.c, I chanced to notice that while
its calls to ExecBR*Triggers and ExecIR*Triggers are protected by
tests to see if there are any relevant triggers to fire, its calls
to ExecAR*Triggers are not; the latter functions do the equivalent
tests themselves. This seems possibly reasonable given the more
complex conditions involved, but what's less reasonable is that
the ExecAR* functions aren't careful to do no work when there is
no work to be done. ExecARInsertTriggers gets this right, but the
other two will both force creation of a slot that the query may
have no use for. ExecARUpdateTriggers additionally performed a
usually-useless ExecClearTuple() on that slot. This is probably
all pretty microscopic in real workloads, but a cycle shaved is a
cycle earned.1 parent 9ee7d53 commit 65158f4
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2546 | 2546 | | |
2547 | 2547 | | |
2548 | 2548 | | |
2549 | | - | |
2550 | 2549 | | |
2551 | 2550 | | |
2552 | 2551 | | |
2553 | 2552 | | |
| 2553 | + | |
| 2554 | + | |
2554 | 2555 | | |
2555 | 2556 | | |
2556 | 2557 | | |
| |||
2829 | 2830 | | |
2830 | 2831 | | |
2831 | 2832 | | |
2832 | | - | |
2833 | | - | |
2834 | | - | |
2835 | 2833 | | |
2836 | 2834 | | |
2837 | 2835 | | |
| |||
2844 | 2842 | | |
2845 | 2843 | | |
2846 | 2844 | | |
| 2845 | + | |
| 2846 | + | |
2847 | 2847 | | |
2848 | 2848 | | |
2849 | 2849 | | |
| |||
2854 | 2854 | | |
2855 | 2855 | | |
2856 | 2856 | | |
| 2857 | + | |
| 2858 | + | |
2857 | 2859 | | |
2858 | 2860 | | |
2859 | 2861 | | |
| |||
0 commit comments