forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9d701e6
committed
Rework EXPLAIN for planner's buffer usage.
Commitce77abe allowed EXPLAIN (BUFFERS) to report the informationon buffer usage during planning phase. However three issues werereported regarding this feature.(1) Previously, EXPLAIN option BUFFERS required ANALYZE. So the query had to be actually executed by specifying ANALYZE even when we want to see only the planner's buffer usage. This was inconvenient especially when the query was write one like DELETE.(2) EXPLAIN included the planner's buffer usage in summary information. So SUMMARY option had to be enabled to report that. Also this format was confusing.(3) The output structure for planning information was not consistent between TEXT format and the others. For example, "Planning" tag was output in JSON format, but not in TEXT format.For (1), this commit allows us to perform EXPLAIN (BUFFERS) withoutANALYZE to report the planner's buffer usage.For (2), this commit changed EXPLAIN output so that the planner'sbuffer usage is reported before summary information.For (3), this commit made the output structure for planninginformation more consistent between the formats.Back-patch to v13 where the planner's buffer usage was allowed tobe reported in EXPLAIN.Reported-by: Pierre Giraud, David RowleyAuthor: Fujii MasaoReviewed-by: David Rowley, Julien Rouhaud, Pierre GiraudDiscussion:https://postgr.es/m/07b226e6-fa49-687f-b110-b7c37572f69e@dalibo.com1 parentd259afa commit9d701e6
File tree
4 files changed
+77
-29
lines changed- doc/src/sgml/ref
- src
- backend/commands
- test/regress
- expected
- sql
4 files changed
+77
-29
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
187 | 187 |
| |
188 | 188 |
| |
189 | 189 |
| |
190 |
| - | |
191 |
| - | |
| 190 | + | |
192 | 191 |
| |
193 | 192 |
| |
194 | 193 |
| |
|
Lines changed: 23 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
119 |
| - | |
| 119 | + | |
| 120 | + | |
120 | 121 |
| |
121 | 122 |
| |
122 | 123 |
| |
| |||
221 | 222 |
| |
222 | 223 |
| |
223 | 224 |
| |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 | 225 |
| |
230 | 226 |
| |
231 | 227 |
| |
| |||
586 | 582 |
| |
587 | 583 |
| |
588 | 584 |
| |
589 |
| - | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
590 | 588 |
| |
| 589 | + | |
| 590 | + | |
| 591 | + | |
591 | 592 |
| |
592 | 593 |
| |
593 | 594 |
| |
| |||
596 | 597 |
| |
597 | 598 |
| |
598 | 599 |
| |
599 |
| - | |
600 |
| - | |
601 |
| - | |
602 |
| - | |
603 |
| - | |
604 |
| - | |
605 |
| - | |
606 |
| - | |
607 |
| - | |
608 |
| - | |
609 |
| - | |
610 |
| - | |
611 |
| - | |
612 | 600 |
| |
613 | 601 |
| |
614 | 602 |
| |
| |||
1996 | 1984 |
| |
1997 | 1985 |
| |
1998 | 1986 |
| |
1999 |
| - | |
| 1987 | + | |
2000 | 1988 |
| |
2001 | 1989 |
| |
2002 | 1990 |
| |
| |||
2015 | 2003 |
| |
2016 | 2004 |
| |
2017 | 2005 |
| |
2018 |
| - | |
| 2006 | + | |
2019 | 2007 |
| |
2020 | 2008 |
| |
2021 | 2009 |
| |
| |||
3301 | 3289 |
| |
3302 | 3290 |
| |
3303 | 3291 |
| |
3304 |
| - | |
| 3292 | + | |
3305 | 3293 |
| |
3306 | 3294 |
| |
3307 | 3295 |
| |
| |||
3317 | 3305 |
| |
3318 | 3306 |
| |
3319 | 3307 |
| |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
3320 | 3317 |
| |
3321 | 3318 |
| |
3322 | 3319 |
| |
| |||
3386 | 3383 |
| |
3387 | 3384 |
| |
3388 | 3385 |
| |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
3389 | 3389 |
| |
3390 | 3390 |
| |
3391 | 3391 |
| |
|
Lines changed: 51 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
109 |
| - | |
110 | 109 |
| |
111 | 110 |
| |
112 | 111 |
| |
| |||
118 | 117 |
| |
119 | 118 |
| |
120 | 119 |
| |
| 120 | + | |
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
| |||
155 | 155 |
| |
156 | 156 |
| |
157 | 157 |
| |
158 |
| - | |
159 | 158 |
| |
160 | 159 |
| |
161 | 160 |
| |
| |||
167 | 166 |
| |
168 | 167 |
| |
169 | 168 |
| |
| 169 | + | |
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
| |||
201 | 201 |
| |
202 | 202 |
| |
203 | 203 |
| |
204 |
| - | |
205 | 204 |
| |
206 | 205 |
| |
207 | 206 |
| |
| |||
212 | 211 |
| |
213 | 212 |
| |
214 | 213 |
| |
| 214 | + | |
215 | 215 |
| |
216 | 216 |
| |
217 | 217 |
| |
218 | 218 |
| |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
219 | 266 |
| |
220 | 267 |
| |
221 | 268 |
| |
| |||
402 | 449 |
| |
403 | 450 |
| |
404 | 451 |
| |
405 |
| - | |
406 | 452 |
| |
407 | 453 |
| |
408 | 454 |
| |
| |||
416 | 462 |
| |
417 | 463 |
| |
418 | 464 |
| |
| 465 | + | |
419 | 466 |
| |
420 | 467 |
| |
421 | 468 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
| 60 | + | |
| 61 | + | |
60 | 62 |
| |
61 | 63 |
| |
62 | 64 |
| |
|
0 commit comments
Comments
(0)