forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit815ef2f
committed
Don't constraint-exclude partitioned tables as much
We only need to invoke constraint exclusion on partitioned tables whenthey are a partition, and they themselves contain a default partition;it's not necessary otherwise, and it's expensive, so avoid it. Also, wewere trying once for each clause separately, but we can do it for allthe clauses at once.While at it, centralize setting of RelOptInfo->partition_qual instead ofcomputing it in slightly different ways in different places.Per complaints from Simon Riggs about4e85642; reviewed by YuzukoHosoya, Kyotaro Horiguchi.Author: Amit Langote. I (Álvaro) again mangled the patch somewhat.Discussion:https://postgr.es/m/CANP8+j+tMCY=nEcQeqQam85=uopLBtX-2vHiLD2bbp7iQQUKpA@mail.gmail.com1 parent416c75c commit815ef2f
File tree
2 files changed
+65
-65
lines changed- src/backend
- optimizer/util
- partitioning
2 files changed
+65
-65
lines changedLines changed: 39 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
| 81 | + | |
| 82 | + | |
| 83 | + | |
81 | 84 |
| |
82 | 85 |
| |
83 | 86 |
| |
| |||
1267 | 1270 |
| |
1268 | 1271 |
| |
1269 | 1272 |
| |
1270 |
| - | |
1271 |
| - | |
1272 |
| - | |
1273 |
| - | |
1274 |
| - | |
1275 |
| - | |
1276 |
| - | |
1277 |
| - | |
1278 |
| - | |
1279 |
| - | |
1280 |
| - | |
1281 |
| - | |
1282 |
| - | |
1283 |
| - | |
1284 |
| - | |
1285 |
| - | |
1286 |
| - | |
1287 |
| - | |
1288 |
| - | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
1289 | 1276 |
| |
1290 | 1277 |
| |
1291 | 1278 |
| |
| |||
2149 | 2136 |
| |
2150 | 2137 |
| |
2151 | 2138 |
| |
2152 |
| - | |
| 2139 | + | |
2153 | 2140 |
| |
2154 | 2141 |
| |
2155 | 2142 |
| |
| |||
2324 | 2311 |
| |
2325 | 2312 |
| |
2326 | 2313 |
| |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + |
Lines changed: 26 additions & 45 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
619 | 619 |
| |
620 | 620 |
| |
621 | 621 |
| |
622 |
| - | |
623 |
| - | |
624 |
| - | |
625 |
| - | |
626 |
| - | |
627 |
| - | |
628 |
| - | |
629 |
| - | |
630 |
| - | |
631 |
| - | |
632 |
| - | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
633 | 627 |
| |
634 |
| - | |
635 |
| - | |
| 628 | + | |
636 | 629 |
| |
637 |
| - | |
638 |
| - | |
639 |
| - | |
640 |
| - | |
641 |
| - | |
642 |
| - | |
643 |
| - | |
644 |
| - | |
645 | 630 |
| |
646 |
| - | |
| 631 | + | |
647 | 632 |
| |
648 | 633 |
| |
649 | 634 |
| |
| |||
867 | 852 |
| |
868 | 853 |
| |
869 | 854 |
| |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
870 | 874 |
| |
871 | 875 |
| |
872 | 876 |
| |
| |||
1019 | 1023 |
| |
1020 | 1024 |
| |
1021 | 1025 |
| |
1022 |
| - | |
1023 |
| - | |
1024 |
| - | |
1025 |
| - | |
1026 |
| - | |
1027 |
| - | |
1028 |
| - | |
1029 |
| - | |
1030 |
| - | |
1031 |
| - | |
1032 |
| - | |
1033 |
| - | |
1034 |
| - | |
1035 |
| - | |
1036 |
| - | |
1037 |
| - | |
1038 |
| - | |
1039 |
| - | |
1040 |
| - | |
1041 |
| - | |
1042 |
| - | |
1043 |
| - | |
1044 |
| - | |
1045 | 1026 |
| |
1046 | 1027 |
| |
1047 | 1028 |
| |
|
0 commit comments
Comments
(0)