forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbcc6c4c
committed
Fix performance issue in EXPLAIN (ANALYZE, TIMING OFF).
Commitaf7914c, which added the TIMINGoption to EXPLAIN, had an oversight: if the TIMING option is disabledthen control in InstrStartNode() goes through an elog(DEBUG2) call, whichtypically does nothing but takes a noticeable amount of time to do it.Tweak the logic to avoid that.In HEAD, also change the elog(DEBUG2)'s in instrument.c to elog(ERROR).It's not very clear why they weren't like that to begin with, but thisepisode shows that not complaining more vociferously about misuse islikely to do little except allow bugs to remain hidden.While at it, adjust some code that was making possibly-dangerousassumptions about flag bits being in the rightmost byte of theinstrument_options word.Problem reported by Pavel Stehule (via Tomas Vondra).1 parent9221f9d commitbcc6c4c
1 file changed
+11
-13
lines changedLines changed: 11 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
| 37 | + | |
36 | 38 |
| |
37 |
| - | |
38 |
| - | |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| |||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 |
| |
59 | 62 |
| |
60 | 63 |
| |
| |||
73 | 76 |
| |
74 | 77 |
| |
75 | 78 |
| |
76 |
| - | |
77 | 79 |
| |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
| 80 | + | |
82 | 81 |
| |
83 | 82 |
| |
84 | 83 |
| |
85 | 84 |
| |
86 | 85 |
| |
87 |
| - | |
88 | 86 |
| |
89 | 87 |
| |
90 | 88 |
| |
| |||
111 | 109 |
| |
112 | 110 |
| |
113 | 111 |
| |
114 |
| - | |
| 112 | + | |
115 | 113 |
| |
116 | 114 |
| |
117 | 115 |
| |
|
0 commit comments
Comments
(0)