forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit34c9e45
committed
Improve performance of partition pruning remapping a little.
ExecFindInitialMatchingSubPlans has to update the PartitionPruneState'ssubplan mapping data to account for the removal of subplans it prunes.However, that's only necessary if run-time pruning will also occur,so we can skip it when that won't happen, which should result in notneeding to do the remapping in many cases. (We now need it only whensome partitions are potentially startup-time prunable and others arepotentially run-time prunable, which seems like an unusual case.)Also make some marginal performance improvements in the remappingitself. These will mainly win if most partitions got pruned bythe startup-time pruning, which is perhaps a debatable assumptionin this context.Also fix some bogus comments, and rearrange code to marginallyreduce space consumption in the executor's query-lifespan context.David Rowley, reviewed by Yoshikazu ImaiDiscussion:https://postgr.es/m/CAKJS1f9+m6-di-zyy4B4AGn0y1B9F8UKDRigtBbNviXOkuyOpw@mail.gmail.com1 parent74514bd commit34c9e45
File tree
3 files changed
+138
-39
lines changed- src
- backend/executor
- test/regress
- expected
- sql
3 files changed
+138
-39
lines changedLines changed: 60 additions & 39 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1596 | 1596 |
| |
1597 | 1597 |
| |
1598 | 1598 |
| |
1599 |
| - | |
1600 |
| - | |
1601 |
| - | |
1602 |
| - | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
1603 | 1606 |
| |
1604 | 1607 |
| |
1605 | 1608 |
| |
| |||
1613 | 1616 |
| |
1614 | 1617 |
| |
1615 | 1618 |
| |
| 1619 | + | |
1616 | 1620 |
| |
1617 | 1621 |
| |
1618 | 1622 |
| |
1619 | 1623 |
| |
1620 |
| - | |
| 1624 | + | |
1621 | 1625 |
| |
1622 | 1626 |
| |
1623 | 1627 |
| |
1624 | 1628 |
| |
1625 |
| - | |
1626 |
| - | |
| 1629 | + | |
| 1630 | + | |
1627 | 1631 |
| |
1628 | 1632 |
| |
1629 | 1633 |
| |
| |||
1640 | 1644 |
| |
1641 | 1645 |
| |
1642 | 1646 |
| |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
1643 | 1650 |
| |
1644 | 1651 |
| |
1645 | 1652 |
| |
1646 | 1653 |
| |
1647 | 1654 |
| |
1648 |
| - | |
1649 |
| - | |
1650 |
| - | |
1651 | 1655 |
| |
1652 | 1656 |
| |
1653 | 1657 |
| |
1654 |
| - | |
1655 |
| - | |
1656 |
| - | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
1657 | 1666 |
| |
1658 |
| - | |
| 1667 | + | |
1659 | 1668 |
| |
1660 | 1669 |
| |
1661 | 1670 |
| |
| |||
1664 | 1673 |
| |
1665 | 1674 |
| |
1666 | 1675 |
| |
1667 |
| - | |
1668 |
| - | |
| 1676 | + | |
| 1677 | + | |
1669 | 1678 |
| |
1670 |
| - | |
1671 |
| - | |
1672 |
| - | |
1673 |
| - | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
1674 | 1683 |
| |
1675 |
| - | |
1676 |
| - | |
1677 |
| - | |
1678 |
| - | |
1679 |
| - | |
1680 |
| - | |
1681 |
| - | |
1682 |
| - | |
| 1684 | + | |
| 1685 | + | |
1683 | 1686 |
| |
1684 |
| - | |
1685 |
| - | |
1686 | 1687 |
| |
1687 | 1688 |
| |
1688 | 1689 |
| |
| |||
1699 | 1700 |
| |
1700 | 1701 |
| |
1701 | 1702 |
| |
1702 |
| - | |
| 1703 | + | |
1703 | 1704 |
| |
1704 | 1705 |
| |
1705 | 1706 |
| |
| |||
1728 | 1729 |
| |
1729 | 1730 |
| |
1730 | 1731 |
| |
1731 |
| - | |
| 1732 | + | |
1732 | 1733 |
| |
1733 |
| - | |
| 1734 | + | |
1734 | 1735 |
| |
1735 | 1736 |
| |
1736 | 1737 |
| |
| |||
1748 | 1749 |
| |
1749 | 1750 |
| |
1750 | 1751 |
| |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
1751 | 1765 |
| |
1752 | 1766 |
| |
1753 | 1767 |
| |
| |||
1768 | 1782 |
| |
1769 | 1783 |
| |
1770 | 1784 |
| |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
1771 | 1792 |
| |
1772 | 1793 |
| |
1773 |
| - | |
| 1794 | + | |
1774 | 1795 |
| |
1775 | 1796 |
| |
1776 | 1797 |
| |
1777 | 1798 |
| |
1778 |
| - | |
1779 |
| - | |
| 1799 | + | |
| 1800 | + | |
1780 | 1801 |
| |
1781 | 1802 |
| |
1782 | 1803 |
| |
| |||
1792 | 1813 |
| |
1793 | 1814 |
| |
1794 | 1815 |
| |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
1795 | 1819 |
| |
1796 | 1820 |
| |
1797 | 1821 |
| |
1798 | 1822 |
| |
1799 | 1823 |
| |
1800 |
| - | |
1801 |
| - | |
1802 |
| - | |
1803 | 1824 |
| |
1804 | 1825 |
| |
1805 | 1826 |
| |
|
Lines changed: 50 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2472 | 2472 |
| |
2473 | 2473 |
| |
2474 | 2474 |
| |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
2475 | 2524 |
| |
2476 | 2525 |
| |
2477 | 2526 |
| |
2478 | 2527 |
| |
2479 | 2528 |
| |
| 2529 | + | |
2480 | 2530 |
| |
2481 | 2531 |
| |
2482 | 2532 |
| |
|
Lines changed: 28 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
548 | 548 |
| |
549 | 549 |
| |
550 | 550 |
| |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
551 | 578 |
| |
552 | 579 |
| |
553 | 580 |
| |
554 | 581 |
| |
555 | 582 |
| |
| 583 | + | |
556 | 584 |
| |
557 | 585 |
| |
558 | 586 |
| |
|
0 commit comments
Comments
(0)