forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc38b759
committed
Tweak ExecIndexEvalRuntimeKeys to forcibly detoast any toasted comparison
values before they get passed to the index access method. This avoidsrepeated detoastings that will otherwise ensue as the comparison valueis examined by various index support functions. We have seen a couple ofreports of cases where repeated detoastings result in an order-of-magnitudeslowdown, so it seems worth adding a bit of extra logic to prevent this.I had previously proposed trying to avoid duplicate detoastings in general,but this fix takes care of what seems the most important case in practicewith very little effort or risk.Back-patch to 8.4 so that the PostGIS folk won't have to wait a year tohave this fix in a production release. (The issue exists further back,of course, but the code's diverged enough to make backpatching further ahigher-risk action. Also it appears that the possible gains may be limitedin prior releases because of different handling of lossy operators.)1 parent56e985d commitc38b759
File tree
2 files changed
+56
-33
lines changed- src
- backend/executor
- include/nodes
2 files changed
+56
-33
lines changedLines changed: 54 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
238 | 238 |
| |
239 | 239 |
| |
240 | 240 |
| |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
241 | 245 |
| |
242 | 246 |
| |
243 | 247 |
| |
| |||
256 | 260 |
| |
257 | 261 |
| |
258 | 262 |
| |
259 |
| - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
260 | 269 |
| |
261 |
| - | |
262 |
| - | |
263 |
| - | |
264 |
| - | |
265 |
| - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
266 | 274 |
| |
| 275 | + | |
| 276 | + | |
267 | 277 |
| |
| 278 | + | |
268 | 279 |
| |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
269 | 284 |
| |
| 285 | + | |
270 | 286 |
| |
| 287 | + | |
| 288 | + | |
271 | 289 |
| |
272 | 290 |
| |
273 | 291 |
| |
| |||
795 | 813 |
| |
796 | 814 |
| |
797 | 815 |
| |
| 816 | + | |
| 817 | + | |
798 | 818 |
| |
799 | 819 |
| |
800 | 820 |
| |
| |||
843 | 863 |
| |
844 | 864 |
| |
845 | 865 |
| |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
846 | 891 |
| |
847 | 892 |
| |
848 | 893 |
| |
| |||
867 | 912 |
| |
868 | 913 |
| |
869 | 914 |
| |
| 915 | + | |
| 916 | + | |
870 | 917 |
| |
871 | 918 |
| |
872 | 919 |
| |
873 | 920 |
| |
874 |
| - | |
875 |
| - | |
876 |
| - | |
877 |
| - | |
878 |
| - | |
879 |
| - | |
880 |
| - | |
881 |
| - | |
882 |
| - | |
883 |
| - | |
884 |
| - | |
885 |
| - | |
886 |
| - | |
887 |
| - | |
888 |
| - | |
889 |
| - | |
890 |
| - | |
891 |
| - | |
892 |
| - | |
893 |
| - | |
894 |
| - | |
895 |
| - | |
896 |
| - | |
897 |
| - | |
898 |
| - | |
899 | 921 |
| |
900 | 922 |
| |
901 | 923 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
1084 | 1084 |
| |
1085 | 1085 |
| |
1086 | 1086 |
| |
| 1087 | + | |
1087 | 1088 |
| |
1088 | 1089 |
| |
1089 | 1090 |
| |
|
0 commit comments
Comments
(0)