forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc2a4078
committed
Enable BUFFERS with EXPLAIN ANALYZE by default
The topic of turning EXPLAIN's BUFFERS option on with the ANALYZE optionhas come up a few times over the past few years. In many ways, doing thisseems like a good idea as it may be more obvious to users why a givenquery is running more slowly than they might expect. Also, from my own(David's) personal experience, I've seen users posting to the mailinglists with two identical plans, one slow and one fast asking why theirquery is sometimes slow. In many cases, this is due to additional reads.Having BUFFERS on by default may help reduce some of these questions, andif not, make it more obvious to the user before they post, or save around-trip to the mailing list when additional I/O effort is the cause ofthe slowness.The general consensus is that we want BUFFERS on by default withANALYZE. However, there were more than zero concerns raised with doingso. The primary reason against is the additional verbosity, making itharder to read large plans. Another concern was that buffer informationisn't always useful so may not make sense to have it on by default.It's currently December, so let's commit this to see if anyone comesforward with a strong objection against making this change. We have overhalf a year remaining in the v18 cycle where we could still easily considerreverting this if someone were to come forward with a convincing enoughreason as to why doing this is a bad idea.There were two patches independently submitted to achieve this goal, oneby me and the other by Guillaume. This commit is a mix of both of thesepatches with some additional work done by me to adjust variousadditional places in the documentation which include EXPLAIN ANALYZEoutput.Author: Guillaume Lelarge, David RowleyReviewed-by: Robert Haas, Greg Sabino Mullane, Michael ChristofidesDiscussion:https://postgr.es/m/CANNMO++W7MM8T0KyXN3ZheXXt-uLVM3aEtZd+WNfZ=obxffUiA@mail.gmail.com1 parent0f57382 commitc2a4078
File tree
30 files changed
+257
-197
lines changed- contrib/postgres_fdw
- expected
- sql
- doc/src/sgml
- ref
- src
- backend/commands
- test/regress
- expected
- sql
30 files changed
+257
-197
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11553 | 11553 |
| |
11554 | 11554 |
| |
11555 | 11555 |
| |
11556 |
| - | |
| 11556 | + | |
11557 | 11557 |
| |
11558 | 11558 |
| |
11559 | 11559 |
| |
| |||
11799 | 11799 |
| |
11800 | 11800 |
| |
11801 | 11801 |
| |
11802 |
| - | |
| 11802 | + | |
11803 | 11803 |
| |
11804 | 11804 |
| |
11805 | 11805 |
| |
| |||
11843 | 11843 |
| |
11844 | 11844 |
| |
11845 | 11845 |
| |
11846 |
| - | |
| 11846 | + | |
11847 | 11847 |
| |
11848 | 11848 |
| |
11849 | 11849 |
| |
| |||
12003 | 12003 |
| |
12004 | 12004 |
| |
12005 | 12005 |
| |
12006 |
| - | |
| 12006 | + | |
12007 | 12007 |
| |
12008 | 12008 |
| |
12009 | 12009 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3904 | 3904 |
| |
3905 | 3905 |
| |
3906 | 3906 |
| |
3907 |
| - | |
| 3907 | + | |
3908 | 3908 |
| |
3909 | 3909 |
| |
3910 | 3910 |
| |
| |||
3979 | 3979 |
| |
3980 | 3980 |
| |
3981 | 3981 |
| |
3982 |
| - | |
| 3982 | + | |
3983 | 3983 |
| |
3984 | 3984 |
| |
3985 | 3985 |
| |
3986 | 3986 |
| |
3987 | 3987 |
| |
3988 |
| - | |
| 3988 | + | |
3989 | 3989 |
| |
3990 | 3990 |
| |
3991 | 3991 |
| |
| |||
4037 | 4037 |
| |
4038 | 4038 |
| |
4039 | 4039 |
| |
4040 |
| - | |
| 4040 | + | |
4041 | 4041 |
| |
4042 | 4042 |
| |
4043 | 4043 |
| |
|
Lines changed: 12 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
| 124 | + | |
124 | 125 |
| |
125 | 126 |
| |
126 |
| - | |
| 127 | + | |
127 | 128 |
| |
128 | 129 |
| |
129 | 130 |
| |
| |||
144 | 145 |
| |
145 | 146 |
| |
146 | 147 |
| |
| 148 | + | |
147 | 149 |
| |
148 | 150 |
| |
149 |
| - | |
| 151 | + | |
150 | 152 |
| |
151 | 153 |
| |
152 | 154 |
| |
| |||
168 | 170 |
| |
169 | 171 |
| |
170 | 172 |
| |
| 173 | + | |
171 | 174 |
| |
172 | 175 |
| |
| 176 | + | |
173 | 177 |
| |
174 | 178 |
| |
175 |
| - | |
| 179 | + | |
176 | 180 |
| |
177 | 181 |
| |
178 | 182 |
| |
| |||
199 | 203 |
| |
200 | 204 |
| |
201 | 205 |
| |
| 206 | + | |
202 | 207 |
| |
| 208 | + | |
203 | 209 |
| |
204 | 210 |
| |
| 211 | + | |
205 | 212 |
| |
206 | 213 |
| |
| 214 | + | |
207 | 215 |
| |
208 | 216 |
| |
209 |
| - | |
| 217 | + | |
210 | 218 |
| |
211 | 219 |
| |
212 | 220 |
| |
|
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
| 152 | + | |
152 | 153 |
| |
| 154 | + | |
153 | 155 |
| |
154 | 156 |
| |
155 |
| - | |
156 | 157 |
| |
157 | 158 |
| |
158 | 159 |
| |
| |||
165 | 166 |
| |
166 | 167 |
| |
167 | 168 |
| |
| 169 | + | |
168 | 170 |
| |
| 171 | + | |
169 | 172 |
| |
170 | 173 |
| |
171 | 174 |
| |
|
Lines changed: 31 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
| 42 | + | |
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| |||
722 | 722 |
| |
723 | 723 |
| |
724 | 724 |
| |
| 725 | + | |
725 | 726 |
| |
726 | 727 |
| |
727 | 728 |
| |
| 729 | + | |
728 | 730 |
| |
729 | 731 |
| |
| 732 | + | |
730 | 733 |
| |
731 | 734 |
| |
| 735 | + | |
| 736 | + | |
| 737 | + | |
732 | 738 |
| |
733 | 739 |
| |
734 | 740 |
| |
| |||
769 | 775 |
| |
770 | 776 |
| |
771 | 777 |
| |
| 778 | + | |
772 | 779 |
| |
773 | 780 |
| |
| 781 | + | |
774 | 782 |
| |
| 783 | + | |
775 | 784 |
| |
776 | 785 |
| |
| 786 | + | |
777 | 787 |
| |
778 | 788 |
| |
779 | 789 |
| |
| 790 | + | |
780 | 791 |
| |
781 | 792 |
| |
| 793 | + | |
| 794 | + | |
| 795 | + | |
782 | 796 |
| |
783 | 797 |
| |
784 | 798 |
| |
| |||
803 | 817 |
| |
804 | 818 |
| |
805 | 819 |
| |
| 820 | + | |
806 | 821 |
| |
807 | 822 |
| |
808 | 823 |
| |
| |||
826 | 841 |
| |
827 | 842 |
| |
828 | 843 |
| |
| 844 | + | |
829 | 845 |
| |
830 | 846 |
| |
831 | 847 |
| |
| |||
845 | 861 |
| |
846 | 862 |
| |
847 | 863 |
| |
| 864 | + | |
848 | 865 |
| |
849 | 866 |
| |
850 | 867 |
| |
| |||
857 | 874 |
| |
858 | 875 |
| |
859 | 876 |
| |
860 |
| - | |
861 |
| - | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
862 | 885 |
| |
863 | 886 |
| |
864 |
| - | |
| 887 | + | |
865 | 888 |
| |
866 | 889 |
| |
867 | 890 |
| |
868 | 891 |
| |
869 | 892 |
| |
870 | 893 |
| |
871 |
| - | |
872 | 894 |
| |
873 |
| - | |
874 | 895 |
| |
875 | 896 |
| |
876 |
| - | |
877 | 897 |
| |
878 | 898 |
| |
879 |
| - | |
880 |
| - | |
881 |
| - | |
882 | 899 |
| |
883 | 900 |
| |
884 | 901 |
| |
885 |
| - | |
886 |
| - | |
887 |
| - | |
888 | 902 |
| |
889 | 903 |
| |
890 | 904 |
| |
| |||
906 | 920 |
| |
907 | 921 |
| |
908 | 922 |
| |
| 923 | + | |
909 | 924 |
| |
910 | 925 |
| |
| 926 | + | |
911 | 927 |
| |
912 | 928 |
| |
913 | 929 |
| |
| |||
1040 | 1056 |
| |
1041 | 1057 |
| |
1042 | 1058 |
| |
| 1059 | + | |
1043 | 1060 |
| |
1044 | 1061 |
| |
1045 | 1062 |
| |
1046 | 1063 |
| |
| 1064 | + | |
1047 | 1065 |
| |
1048 | 1066 |
| |
1049 | 1067 |
| |
|
Lines changed: 9 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
489 | 489 |
| |
490 | 490 |
| |
491 | 491 |
| |
492 |
| - | |
| 492 | + | |
493 | 493 |
| |
494 | 494 |
| |
495 | 495 |
| |
| |||
506 | 506 |
| |
507 | 507 |
| |
508 | 508 |
| |
509 |
| - | |
| 509 | + | |
510 | 510 |
| |
511 | 511 |
| |
512 | 512 |
| |
| |||
530 | 530 |
| |
531 | 531 |
| |
532 | 532 |
| |
533 |
| - | |
| 533 | + | |
534 | 534 |
| |
535 | 535 |
| |
536 | 536 |
| |
| |||
551 | 551 |
| |
552 | 552 |
| |
553 | 553 |
| |
554 |
| - | |
| 554 | + | |
555 | 555 |
| |
556 | 556 |
| |
557 | 557 |
| |
| |||
562 | 562 |
| |
563 | 563 |
| |
564 | 564 |
| |
565 |
| - | |
| 565 | + | |
566 | 566 |
| |
567 | 567 |
| |
568 | 568 |
| |
| |||
575 | 575 |
| |
576 | 576 |
| |
577 | 577 |
| |
578 |
| - | |
| 578 | + | |
579 | 579 |
| |
580 | 580 |
| |
581 | 581 |
| |
| |||
615 | 615 |
| |
616 | 616 |
| |
617 | 617 |
| |
618 |
| - | |
| 618 | + | |
619 | 619 |
| |
620 | 620 |
| |
621 | 621 |
| |
| |||
672 | 672 |
| |
673 | 673 |
| |
674 | 674 |
| |
675 |
| - | |
| 675 | + | |
676 | 676 |
| |
677 | 677 |
| |
678 | 678 |
| |
| |||
685 | 685 |
| |
686 | 686 |
| |
687 | 687 |
| |
688 |
| - | |
| 688 | + | |
689 | 689 |
| |
690 | 690 |
| |
691 | 691 |
| |
|
0 commit comments
Comments
(0)