forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitdec1034
committed
Improve initdb's query for generating default descriptions a little.
While poking into initdb's performance, I noticed that this querywasn't being done very intelligently. By forcing it to executeobj_description() for each pg_proc/pg_operator join row, we wereessentially setting up a nestloop join to pg_description, whichis not a bright query plan when there are hundreds of outer rows.Convert the check for a "deprecated" operator into a NOT EXISTSso that it can be done as a hashed antijoin. On my workstationthis reduces the time for this query from ~ 35ms to ~ 10ms.Which is not a huge win, but it adds up over buildfarm runs.In passing, insert forced query breaks (\n\n, in single-user mode)after each SQL-query file that initdb sources, and after somerelatively new queries in setup_privileges(). This doesn't makea lot of difference normally, but it will result in briefer, sanererror messages if anything goes wrong.1 parent831f5d1 commitdec1034
1 file changed
+21
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1669 | 1669 | | |
1670 | 1670 | | |
1671 | 1671 | | |
| 1672 | + | |
| 1673 | + | |
1672 | 1674 | | |
1673 | 1675 | | |
1674 | 1676 | | |
| |||
1707 | 1709 | | |
1708 | 1710 | | |
1709 | 1711 | | |
1710 | | - | |
1711 | | - | |
| 1712 | + | |
1712 | 1713 | | |
1713 | 1714 | | |
1714 | 1715 | | |
1715 | 1716 | | |
1716 | 1717 | | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
1720 | 1723 | | |
1721 | 1724 | | |
1722 | 1725 | | |
| |||
1780 | 1783 | | |
1781 | 1784 | | |
1782 | 1785 | | |
| 1786 | + | |
| 1787 | + | |
1783 | 1788 | | |
1784 | 1789 | | |
1785 | 1790 | | |
| |||
1836 | 1841 | | |
1837 | 1842 | | |
1838 | 1843 | | |
1839 | | - | |
| 1844 | + | |
1840 | 1845 | | |
1841 | 1846 | | |
1842 | 1847 | | |
| |||
1852 | 1857 | | |
1853 | 1858 | | |
1854 | 1859 | | |
1855 | | - | |
| 1860 | + | |
1856 | 1861 | | |
1857 | 1862 | | |
1858 | 1863 | | |
| |||
1864 | 1869 | | |
1865 | 1870 | | |
1866 | 1871 | | |
1867 | | - | |
| 1872 | + | |
1868 | 1873 | | |
1869 | 1874 | | |
1870 | 1875 | | |
| |||
1876 | 1881 | | |
1877 | 1882 | | |
1878 | 1883 | | |
1879 | | - | |
| 1884 | + | |
1880 | 1885 | | |
1881 | 1886 | | |
1882 | 1887 | | |
| |||
1888 | 1893 | | |
1889 | 1894 | | |
1890 | 1895 | | |
1891 | | - | |
| 1896 | + | |
1892 | 1897 | | |
1893 | 1898 | | |
1894 | 1899 | | |
| |||
1901 | 1906 | | |
1902 | 1907 | | |
1903 | 1908 | | |
1904 | | - | |
| 1909 | + | |
1905 | 1910 | | |
1906 | 1911 | | |
1907 | 1912 | | |
| |||
1913 | 1918 | | |
1914 | 1919 | | |
1915 | 1920 | | |
1916 | | - | |
| 1921 | + | |
1917 | 1922 | | |
1918 | 1923 | | |
1919 | 1924 | | |
| |||
1926 | 1931 | | |
1927 | 1932 | | |
1928 | 1933 | | |
1929 | | - | |
| 1934 | + | |
1930 | 1935 | | |
1931 | 1936 | | |
1932 | 1937 | | |
| |||
1939 | 1944 | | |
1940 | 1945 | | |
1941 | 1946 | | |
1942 | | - | |
| 1947 | + | |
1943 | 1948 | | |
1944 | 1949 | | |
1945 | 1950 | | |
| |||
1994 | 1999 | | |
1995 | 2000 | | |
1996 | 2001 | | |
| 2002 | + | |
| 2003 | + | |
1997 | 2004 | | |
1998 | 2005 | | |
1999 | 2006 | | |
| |||
0 commit comments
Comments
(0)