forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcdd6ab9
committed
amcheck: Optimize speed of checking for unique constraint violation
Currently, when amcheck validates a unique constraint, it visits the heap foreach index tuple. This commit implements skipping keys, which have only onenon-dedeuplicated index tuple (quite common case for unique indexes). Thatgives substantial economy on index checking time.Reported-by: Noah MischDiscussion:https://postgr.es/m/20240325020323.fd.nmisch%40google.comAuthor: Alexander Korotkov, Pavel Borisov1 parentb181062 commitcdd6ab9
1 file changed
+33
-3
lines changedLines changed: 33 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1433 | 1433 |
| |
1434 | 1434 |
| |
1435 | 1435 |
| |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
1436 | 1443 |
| |
1437 | 1444 |
| |
1438 | 1445 |
| |
| |||
1775 | 1782 |
| |
1776 | 1783 |
| |
1777 | 1784 |
| |
1778 |
| - | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
1779 | 1788 |
| |
1780 | 1789 |
| |
1781 |
| - | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
1782 | 1793 |
| |
1783 | 1794 |
| |
| 1795 | + | |
| 1796 | + | |
1784 | 1797 |
| |
1785 | 1798 |
| |
1786 | 1799 |
| |
| |||
1799 | 1812 |
| |
1800 | 1813 |
| |
1801 | 1814 |
| |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
1802 | 1818 |
| |
1803 | 1819 |
| |
1804 | 1820 |
| |
| |||
1808 | 1824 |
| |
1809 | 1825 |
| |
1810 | 1826 |
| |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
1811 | 1832 |
| |
1812 | 1833 |
| |
1813 | 1834 |
| |
| |||
1890 | 1911 |
| |
1891 | 1912 |
| |
1892 | 1913 |
| |
1893 |
| - | |
| 1914 | + | |
| 1915 | + | |
1894 | 1916 |
| |
1895 | 1917 |
| |
1896 | 1918 |
| |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
1897 | 1927 |
| |
1898 | 1928 |
| |
1899 | 1929 |
| |
|
0 commit comments
Comments
(0)