File size: 489,905 Bytes
e09f0d6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 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 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 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 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 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 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 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 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 | From pgsql-general-owner@postgresql.org Tue Oct 1 14:28:01 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id AA8F7475FBD; Tue, 1 Oct 2002 14:27:59 -0400 (EDT)
Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178])
by postgresql.org (Postfix) with ESMTP
id 3DD86475FBA; Tue, 1 Oct 2002 14:27:59 -0400 (EDT)
Received: by megazone.bigpanda.com (Postfix, from userid 1001)
id 50AF9D60C; Tue, 1 Oct 2002 11:27:56 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
by megazone.bigpanda.com (Postfix) with ESMTP
id 465585C05; Tue, 1 Oct 2002 11:27:56 -0700 (PDT)
Date: Tue, 1 Oct 2002 11:27:56 -0700 (PDT)
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Adam Siegel <adam@sycamorehq.com>
Cc: <pgsql-general@postgresql.org>,
<pgsql-performance@postgresql.org>
Subject: Re: [pgsql-performance] Deletes from tables with foreign keys taking
In-Reply-To: <00ca01c26978$490ee4a0$1537140a@orbital.com>
Message-ID: <20021001112632.F96255-100000@megazone23.bigpanda.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/33
X-Sequence-Number: 31032
On Tue, 1 Oct 2002, Adam Siegel wrote:
> I have a table that has about 200 rows in it. I have 2 other tables
> that have about 300,000 rows each that reference the first table
> through a foriegn key. I run a process that rebuilds these tables.
> First I delete the rows in the large tables (takes about 30 seconds),
> then I delete the the rows in the first table (takes about 5 minutes
> !!!). Each of these are done in separate transactions.
>
> If I do a vacuum analyze on each of the large tables just after the
> delete then deleting the rows from the first table takes just a second
> or two. My guess is that postgres is still check the foriegn keys
> from the first table to the others even though the records are deleted
> in the larger tables. The vacuum cleans up the deleted records, so it
> goes faster. Am I wrong. Any ideas?
That seems reasonable. It's still going to be doing some action on those
tables and it's going to have to scan the tables in some case. It's wierd
that it's taking that long to do it in any case however, what does the
schema for the tables look like?
From pgsql-general-owner@postgresql.org Tue Oct 1 14:23:53 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 4C330476789; Tue, 1 Oct 2002 14:23:51 -0400 (EDT)
Received: from sauron.saihost.net (www.saihost.net [204.178.107.105])
by postgresql.org (Postfix) with ESMTP
id 8573D4761EA; Tue, 1 Oct 2002 14:23:50 -0400 (EDT)
Received: from c2002322 (computrain-client-sycamore.2gaap.net [63.89.77.233]
(may be forged)) (authenticated)
by sauron.saihost.net (8.11.6/8.11.6) with ESMTP id g91INo116339;
Tue, 1 Oct 2002 14:23:50 -0400
Message-ID: <00ca01c26978$490ee4a0$1537140a@orbital.com>
From: "Adam Siegel" <adam@sycamorehq.com>
To: <pgsql-general@postgresql.org>,
<pgsql-performance@postgresql.org>
Subject: Deletes from tables with foreign keys taking too long
Date: Tue, 1 Oct 2002 14:28:04 -0400
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_00C7_01C26956.C11136F0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/32
X-Sequence-Number: 31031
This is a multi-part message in MIME format.
------=_NextPart_000_00C7_01C26956.C11136F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I have a table that has about 200 rows in it. I have 2 other tables that h=
ave about 300,000 rows each that reference the first table through a forieg=
n key. I run a process that rebuilds these tables. First I delete the row=
s in the large tables (takes about 30 seconds), then I delete the the rows =
in the first table (takes about 5 minutes !!!). Each of these are done in =
separate transactions.
If I do a vacuum analyze on each of the large tables just after the delete =
then deleting the rows from the first table takes just a second or two. My=
guess is that postgres is still check the foriegn keys from the first tabl=
e to the others even though the records are deleted in the larger tables. =
The vacuum cleans up the deleted records, so it goes faster. Am I wrong. =
Any ideas?
Regards,
Adam
------=_NextPart_000_00C7_01C26956.C11136F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2719.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have a table that has about 200 rows in =
it. =20
I have 2 other tables that have about 300,000 rows each that reference the =
first=20
table through a foriegn key. I run a process that rebuilds these=20
tables. First I delete the rows in the large tables (takes about 30=
=20
seconds), then I delete the the rows in the first table (takes about 5 minu=
tes=20
!!!). Each of these are done in separate transactions.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>If I do a vacuum analyze on each of the la=
rge=20
tables just after the delete then deleting the rows from the first table ta=
kes=20
just a second or two. My guess is that postgres is still check the fo=
riegn=20
keys from the first table to the others even though the records are deleted=
in=20
the larger tables. The vacuum cleans up the deleted records, so it go=
es=20
faster. Am I wrong. Any ideas?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Adam</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_00C7_01C26956.C11136F0--
From pgsql-general-owner@postgresql.org Fri Oct 4 09:38:41 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id E7A74476944; Tue, 1 Oct 2002 17:45:12 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP
id 46748476943; Tue, 1 Oct 2002 17:45:12 -0400 (EDT)
Received: from [216.135.165.74] (HELO lazarus)
by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP-TLS id 1736581; Tue, 01 Oct 2002 14:45:44 -0700
Content-Type: text/plain;
charset="iso-8859-1"
From: Josh Berkus <josh@agliodbs.com>
Organization: Aglio Database Solutions
To: "Adam Siegel" <adam@sycamorehq.com>,
<pgsql-general@postgresql.org>, <pgsql-performance@postgresql.org>
Subject: Re: [pgsql-performance] Deletes from tables with foreign keys taking
too long
Date: Tue, 1 Oct 2002 14:44:05 -0700
X-Mailer: KMail [version 1.4]
References: <00ca01c26978$490ee4a0$1537140a@orbital.com>
In-Reply-To: <00ca01c26978$490ee4a0$1537140a@orbital.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210011444.05157.josh@agliodbs.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/210
X-Sequence-Number: 31208
Adam,
> I have a table that has about 200 rows in it. I have 2 other tables that
> have about 300,000 rows each that reference the first table through a
> foriegn key. I run a process that rebuilds these tables. First I delete
> the rows in the large tables (takes about 30 seconds), then I delete the
> the rows in the first table (takes about 5 minutes !!!). Each of these a=
re
> done in separate transactions.
Not that this answers your performance questions, but you will be able to d=
o=20
this faster if you use TRUNCATE instead of DELETE.
--=20
Josh Berkus
josh@agliodbs.com
Aglio Database Solutions
San Francisco
From pgsql-performance-owner@postgresql.org Tue Oct 1 17:52:38 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 41A164762C6
for <pgsql-performance@postgresql.org>;
Tue, 1 Oct 2002 17:52:37 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 911D74762FD
for <pgsql-performance@postgresql.org>;
Tue, 1 Oct 2002 17:52:36 -0400 (EDT)
Received: from [216.135.165.74] (HELO lazarus)
by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP-TLS id 1736597 for pgsql-performance@postgresql.org;
Tue, 01 Oct 2002 14:53:08 -0700
Content-Type: text/plain;
charset="us-ascii"
From: Josh Berkus <josh@agliodbs.com>
Organization: Aglio Database Solutions
To: <pgsql-performance@postgresql.org>
Subject: Comparitive UPDATE speed
Date: Tue, 1 Oct 2002 14:51:29 -0700
X-Mailer: KMail [version 1.4]
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210011451.29254.josh@agliodbs.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/4
X-Sequence-Number: 21
Relative performance question:
I have 2 UPDATE queires in a function.=20
table_a: 117,000 records
table_b: 117,000 records
table_c: 1.5 million records
#1 updates table_a, field_2 from table_b, field_1 based on a joining field=
_3.=20
Around 110,000 updates
#2 updates table_a, field_5 from table_c, field_2 joining on field_3.=20=20
Around 110,000 updates.
#1 takes 5-7 minutes; #2 takes about 15 seconds. The only difference I can=
=20
discern is that table_a, field_2 is indexed and table_a, field_5 is not.
Is it reasonable that updating the index would actually make the query take=
=20
20x longer? If not, I'll post actual table defs and query statements.
--=20
Josh Berkus
josh@agliodbs.com
Aglio Database Solutions
San Francisco
From pgsql-performance-owner@postgresql.org Tue Oct 1 19:49:49 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 41A97476133
for <pgsql-performance@postgresql.org>;
Tue, 1 Oct 2002 19:49:48 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 9595A476053
for <pgsql-performance@postgresql.org>;
Tue, 1 Oct 2002 19:49:47 -0400 (EDT)
Received: from [216.135.165.74] (account <josh@agliodbs.com>)
by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9)
with HTTP id 1736716; Tue, 01 Oct 2002 16:50:21 -0700
From: "Josh Berkus" <josh@agliodbs.com>
Subject: Re: Comparitive UPDATE speed
To: Randy Neumann <Randy_Neumann@centralref.com>,
pgsql-performance@postgresql.org
X-Mailer: CommuniGate Pro Web Mailer v.3.5.9
Date: Tue, 01 Oct 2002 16:50:21 -0700
Message-ID: <web-1736716@davinci.ethosmedia.com>
In-Reply-To: <200210012311.RAA51034@mail.simn.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/5
X-Sequence-Number: 22
Randy,
> I'm not sure about 20 times longer but you would have index records
> that
> would need to be changed. Is field_3 indexed in all 3 tables? If
> table_b
> does not have an index on field_3 and the other tables do, I'd guess
> that
> would make this take longer too.
Yeah, they're indexed. I'm going to try the updates without the index
on field_2 tonight.
-Josh Berkus
From pgsql-performance-owner@postgresql.org Wed Oct 2 06:50:03 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id F2D22475CA6
for <pgsql-performance@postgresql.org>;
Wed, 2 Oct 2002 06:50:02 -0400 (EDT)
Received: from lakemtao02.cox.net (lakemtao02.cox.net [68.1.17.243])
by postgresql.org (Postfix) with ESMTP id 63884475C26
for <pgsql-performance@postgresql.org>;
Wed, 2 Oct 2002 06:50:02 -0400 (EDT)
Received: from localhost.localdomain ([68.11.66.83]) by lakemtao02.cox.net
(InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP
id <20021002105005.YRNI12192.lakemtao02.cox.net@localhost.localdomain>
for <pgsql-performance@postgresql.org>;
Wed, 2 Oct 2002 06:50:05 -0400
Subject: Re: Comparitive UPDATE speed
From: Ron Johnson <ron.l.johnson@cox.net>
To: pgsql-performance@postgresql.org
In-Reply-To: <200210011451.29254.josh@agliodbs.com>
References: <200210011451.29254.josh@agliodbs.com>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 02 Oct 2002 05:48:01 -0500
Message-Id: <1033555682.28068.23.camel@haggis>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/6
X-Sequence-Number: 23
On Tue, 2002-10-01 at 16:51, Josh Berkus wrote:
> Relative performance question:
>
> I have 2 UPDATE queires in a function.
>
> table_a: 117,000 records
> table_b: 117,000 records
> table_c: 1.5 million records
>
> #1 updates table_a, field_2 from table_b, field_1 based on a joining field_3.
> Around 110,000 updates
> #2 updates table_a, field_5 from table_c, field_2 joining on field_3.
> Around 110,000 updates.
>
> #1 takes 5-7 minutes; #2 takes about 15 seconds. The only difference I can
> discern is that table_a, field_2 is indexed and table_a, field_5 is not.
>
> Is it reasonable that updating the index would actually make the query take
> 20x longer? If not, I'll post actual table defs and query statements.
Absolutely. You are doing lots of extra work.
For each of the 110,000 updates, you are deleting a leaf node from one
part of the index tree and then inserting it into another part of the
tree.
It will get even worse as you add more rows to table_a, since the
index tree will get deeper, and more work work must be done during
each insert and delete.
--
+------------------------------------------------------------+
| Ron Johnson, Jr. mailto:ron.l.johnson@cox.net |
| Jefferson, LA USA http://members.cox.net/ron.l.johnson |
| |
| "What other evidence do you have that they are terrorists, |
| other than that they trained in these camps?" |
| 17-Sep-2002 Katie Couric to an FBI agent regarding the 5 |
| men arrested near Buffalo NY |
+------------------------------------------------------------+
From pgsql-general-owner@postgresql.org Thu Oct 3 08:35:42 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 45BC5476237
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 08:35:40 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id 79B41476228
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 08:35:38 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g93Cb8l17916
for <pgsql-general@postgresql.org>; Thu, 3 Oct 2002 18:07:08 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g93Cb7v17906;
Thu, 3 Oct 2002 18:07:07 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-hackers@postgresql.org
Date: Thu, 03 Oct 2002 18:06:10 +0530
MIME-Version: 1.0
Content-type: Multipart/Mixed; boundary=Message-Boundary-2419
Subject: Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Cc: pgsql-general <pgsql-general@postgresql.org>,
"pankaj M. Tolani" <pankaj@pspl.co.in>
Message-ID: <3D9C8712.9513.9C6521D@localhost>
X-mailer: Pegasus Mail for Windows (v4.02)
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/115
X-Sequence-Number: 31114
--Message-Boundary-2419
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
Hi,
Today we concluded test for database performance. Attached are results and the
schema, for those who have missed earlier discussion on this.
We have (almost) decided that we will partition the data across machines. The
theme is, after every some short interval a burst of data will be entered in
new table in database, indexed and vacuume. The table(s) will be inherited so
that query on base table will fetch results from all the children. The
application has to consolidate all the data per node basis. If the database is
not postgresql, app. has to consolidate data across partitions as well.
Now we need to investigate whether selecting on base table to include children
would use indexes created on children table.
It's estimated that when entire data is gathered, total number of children
tables would be around 1K-1.1K across all machines.
This is in point of average rate of data insertion i.e. 5K records/sec and
total data size, estimated to be 9 billion rows max i.e. estimated database
size is 900GB. Obviously it's impossible to keep insertion rate on an indexed
table high as data grows. So partitioning/inheritance looks better approach.
Postgresql is not the final winner as yet. Mysql is in close range. I will keep
you guys posted about the result.
Let me know about any comments..
Bye
Shridhar
--
Price's Advice: It's all a game -- play it to have fun.
--Message-Boundary-2419
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Text from file 'pgbenchmark.txt'
Machine
Compaq Proliant Server ML 530
"Intel Xeon 2.4 Ghz Processor x 4, "
"4 GB RAM, 5 x 72.8 GB SCSI HDD "
"RAID 0 (Striping) Hardware Setup, Mandrake Linux 9.0"
"Cost - $13,500 ($1,350 for each additional 72GB HDD)"
Performance Parameter MySQL 3.23.52 MySQL 3.23.52 PostgreSQL 7.2.2
WITHOUT InnoDB WITH InnoDB for with built-in support
for transactional transactional support for transactions
support
Complete Data
Inserts + building a composite index
"40 GB data, 432,000,000 tuples" 3738 secs 18720 secs 20628 secs
"about 100 bytes each, schema on
'schema' sheet"
"composite index on 3 fields
(esn, min, datetime)"
Load Speed 115570 tuples/second 23076 tuples/second 20942 tuples/second
Database Size on Disk 48 GB 87 GB 111 GB
Average per partition
Inserts + building a composite index
"300MB data, 3,000,000 tuples," 28 secs 130 secs 150 secs
"about 100 bytes each, schema on
'schema' sheet"
"composite index on 3 fields
(esn, min, datetime)"
Select Query 7 secs 7 secs 6 secs
based on equality match of 2 fields
(esn and min) - 4 concurrent queries
running
Database Size on Disk 341 MB 619 MB 788 MB
--Message-Boundary-2419
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Text from file 'schema.txt'
Field Name Field Type Nullable Indexed
type int no no
esn char (10) no yes
min char (10) no yes
datetime timestamp no yes
opc0 char (3) no no
opc1 char (3) no no
opc2 char (3) no no
dpc0 char (3) no no
dpc1 char (3) no no
dpc2 char (3) no no
npa char (3) no no
nxx char (3) no no
rest char (4) no no
field0 int yes no
field1 char (4) yes no
field2 int yes no
field3 char (4) yes no
field4 int yes no
field5 char (4) yes no
field6 int yes no
field7 char (4) yes no
field8 int yes no
field9 char (4) yes no
--Message-Boundary-2419--
From pgsql-general-owner@postgresql.org Thu Oct 3 08:54:34 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 77A89476228; Thu, 3 Oct 2002 08:54:32 -0400 (EDT)
Received: from clearmetrix.com (unknown [209.92.142.67])
by postgresql.org (Postfix) with ESMTP
id 9462F476223; Thu, 3 Oct 2002 08:54:30 -0400 (EDT)
Received: from clearmetrix.com (chw.muvpn.clearmetrix.com [172.16.1.3] (may be
forged))
by clearmetrix.com (8.11.6/linuxconf) with ESMTP id g93CsQV11899;
Thu, 3 Oct 2002 08:54:26 -0400
Message-ID: <3D9C3E05.7070906@clearmetrix.com>
Date: Thu, 03 Oct 2002 08:54:29 -0400
From: "Charles H. Woloszynski" <chw@clearmetrix.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
"pankaj M. Tolani" <pankaj@pspl.co.in>
Subject: Re: Large databases, performance
References: <3D9C8712.9513.9C6521D@localhost>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/116
X-Sequence-Number: 31115
Can you comment on the tools you are using to do the insertions (Perl,
Java?) and the distribution of data (all random, all static), and the
transaction scope (all inserts in one transaction, each insert as a
single transaction, some group of inserts as a transaction).
I'd be curious what happens when you submit more queries than you have
processors (you had four concurrent queries and four CPUs), if you care
to run any additional tests. Also, I'd report the query time in
absolute (like you did) and also in 'Time/number of concurrent queries".
This will give you a sense of how the system is scaling as the workload
increases. Personally I am more concerned about this aspect than the
load time, since I am going to guess that this is where all the time is
spent.
Was the original posting on GENERAL or HACKERS. Is this moving the
PERFORMANCE for follow-up? I'd like to follow this discussion and want
to know if I should join another group?
Thanks,
Charlie
P.S. Anyone want to comment on their expectation for 'commercial'
databases handling this load? I know that we cannot speak about
specific performance metrics on some products (licensing restrictions)
but I'd be curious if folks have seen some of the databases out there
handle these dataset sizes and respond resonably.
Shridhar Daithankar wrote:
>Hi,
>
>Today we concluded test for database performance. Attached are results and the
>schema, for those who have missed earlier discussion on this.
>
>We have (almost) decided that we will partition the data across machines. The
>theme is, after every some short interval a burst of data will be entered in
>new table in database, indexed and vacuume. The table(s) will be inherited so
>that query on base table will fetch results from all the children. The
>application has to consolidate all the data per node basis. If the database is
>not postgresql, app. has to consolidate data across partitions as well.
>
>Now we need to investigate whether selecting on base table to include children
>would use indexes created on children table.
>
>It's estimated that when entire data is gathered, total number of children
>tables would be around 1K-1.1K across all machines.
>
>This is in point of average rate of data insertion i.e. 5K records/sec and
>total data size, estimated to be 9 billion rows max i.e. estimated database
>size is 900GB. Obviously it's impossible to keep insertion rate on an indexed
>table high as data grows. So partitioning/inheritance looks better approach.
>
>Postgresql is not the final winner as yet. Mysql is in close range. I will keep
>you guys posted about the result.
>
>Let me know about any comments..
>
>Bye
> Shridhar
>
>--
>Price's Advice: It's all a game -- play it to have fun.
>
>
>
>
>------------------------------------------------------------------------
>
>Machine
>Compaq Proliant Server ML 530
>"Intel Xeon 2.4 Ghz Processor x 4, "
>"4 GB RAM, 5 x 72.8 GB SCSI HDD "
>"RAID 0 (Striping) Hardware Setup, Mandrake Linux 9.0"
>"Cost - $13,500 ($1,350 for each additional 72GB HDD)"
>
>Performance Parameter MySQL 3.23.52 MySQL 3.23.52 PostgreSQL 7.2.2
> WITHOUT InnoDB WITH InnoDB for with built-in support
> for transactional transactional support for transactions
> support
>Complete Data
>
>Inserts + building a composite index
>"40 GB data, 432,000,000 tuples" 3738 secs 18720 secs 20628 secs
>"about 100 bytes each, schema on
>'schema' sheet"
>"composite index on 3 fields
>(esn, min, datetime)"
>
>Load Speed 115570 tuples/second 23076 tuples/second 20942 tuples/second
>
>Database Size on Disk 48 GB 87 GB 111 GB
>
>Average per partition
>
>Inserts + building a composite index
>"300MB data, 3,000,000 tuples," 28 secs 130 secs 150 secs
>"about 100 bytes each, schema on
>'schema' sheet"
>"composite index on 3 fields
>(esn, min, datetime)"
>
>Select Query 7 secs 7 secs 6 secs
>based on equality match of 2 fields
>(esn and min) - 4 concurrent queries
>running
>
>Database Size on Disk 341 MB 619 MB 788 MB
>
>
>------------------------------------------------------------------------
>
>Field Name Field Type Nullable Indexed
>type int no no
>esn char (10) no yes
>min char (10) no yes
>datetime timestamp no yes
>opc0 char (3) no no
>opc1 char (3) no no
>opc2 char (3) no no
>dpc0 char (3) no no
>dpc1 char (3) no no
>dpc2 char (3) no no
>npa char (3) no no
>nxx char (3) no no
>rest char (4) no no
>field0 int yes no
>field1 char (4) yes no
>field2 int yes no
>field3 char (4) yes no
>field4 int yes no
>field5 char (4) yes no
>field6 int yes no
>field7 char (4) yes no
>field8 int yes no
>field9 char (4) yes no
>
>
>
>------------------------------------------------------------------------
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>
--
Charles H. Woloszynski
ClearMetrix, Inc.
115 Research Drive
Bethlehem, PA 18015
tel: 610-419-2210 x400
fax: 240-371-3256
web: www.clearmetrix.com
From pgsql-general-owner@postgresql.org Thu Oct 3 08:56:02 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 759394762F8
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 08:56:01 -0400 (EDT)
Received: from smtp.investsystems.co.uk (unknown [62.49.196.163])
by postgresql.org (Postfix) with SMTP id 5512347625C
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 08:56:00 -0400 (EDT)
Received: (qmail 61099 invoked from network); 3 Oct 2002 12:56:03 -0000
Received: from ponder.fairway2k.co.uk (nandrews@172.31.1.3)
by hex.fairway2k.co.uk with SMTP; 3 Oct 2002 12:56:03 -0000
Date: Thu, 3 Oct 2002 13:56:03 +0100 (BST)
From: "Nigel J. Andrews" <nandrews@investsystems.co.uk>
X-Sender: nandrews@ponder.fairway2k.co.uk
To: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Large databases, performance
In-Reply-To: <3D9C8712.9513.9C6521D@localhost>
Message-ID: <Pine.LNX.4.21.0210031353540.26902-100000@ponder.fairway2k.co.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/117
X-Sequence-Number: 31116
Shridhar,
It's one hell of a DB you're building. I'm sure I'm not the only one interested
so to satisfy those of us who are nosey: can you say what the application is?
I'm sure we'll all understand if it's not possible for you mention such
information.
--
Nigel J. Andrews
On Thu, 3 Oct 2002, Shridhar Daithankar wrote:
> Hi,
>
> Today we concluded test for database performance. Attached are results and the
> schema, for those who have missed earlier discussion on this.
>
> We have (almost) decided that we will partition the data across machines. The
> theme is, after every some short interval a burst of data will be entered in
> new table in database, indexed and vacuume. The table(s) will be inherited so
> that query on base table will fetch results from all the children. The
> application has to consolidate all the data per node basis. If the database is
> not postgresql, app. has to consolidate data across partitions as well.
>
> Now we need to investigate whether selecting on base table to include children
> would use indexes created on children table.
>
> It's estimated that when entire data is gathered, total number of children
> tables would be around 1K-1.1K across all machines.
>
> This is in point of average rate of data insertion i.e. 5K records/sec and
> total data size, estimated to be 9 billion rows max i.e. estimated database
> size is 900GB. Obviously it's impossible to keep insertion rate on an indexed
> table high as data grows. So partitioning/inheritance looks better approach.
>
> Postgresql is not the final winner as yet. Mysql is in close range. I will keep
> you guys posted about the result.
>
> Let me know about any comments..
>
> Bye
> Shridhar
From pgsql-general-owner@postgresql.org Thu Oct 3 10:03:00 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 3AC1A475C22
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 10:02:59 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id AA735475AFA
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 10:02:57 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g93E4S327165
for <pgsql-general@postgresql.org>; Thu, 3 Oct 2002 19:34:28 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g93E4Rv27160
for <pgsql-general@postgresql.org>; Thu, 3 Oct 2002 19:34:27 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-general <pgsql-general@postgresql.org>
Date: Thu, 03 Oct 2002 19:33:30 +0530
MIME-Version: 1.0
Subject: Re: Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3D9C9B8A.30310.A16469F@localhost>
References: <3D9C8712.9513.9C6521D@localhost>
In-reply-to: <Pine.LNX.4.21.0210031353540.26902-100000@ponder.fairway2k.co.uk>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/120
X-Sequence-Number: 31119
On 3 Oct 2002 at 13:56, Nigel J. Andrews wrote:
> It's one hell of a DB you're building. I'm sure I'm not the only one interested
> so to satisfy those of us who are nosey: can you say what the application is?
>
> I'm sure we'll all understand if it's not possible for you mention such
> information.
Well, I can't tell everything but somethings I can..
1) This is a system that does not have online capability yet. This is an
attempt to provide one.
2) The goal is to avoid costs like licensing oracle. I am sure this would make
a great example for OSDB advocacy, which ever database wins..
3) The database size estimates, I put earlier i.e. 9 billion tuples/900GB data
size, are in a fixed window. The data is generated from some real time systems.
You can imagine the rate.
4) Further more there are timing restrictions attached to it. 5K inserts/sec.
4800 queries per hour with response time of 10 sec. each. It's this aspect that
has forced us for partitioning..
And contrary to my earlier information, this is going to be a live system
rather than a back up one.. A better win to postgresql.. I hope it makes it.
And BTW, all these results were on reiserfs. We didn't found much of difference
in write performance between them. So we stick to reiserfs. And of course we
got the latest hot shot Mandrake9 with 2.4.19-16 which really made difference
over RHL7.2..
Bye
Shridhar
--
QOTD: "Do you smell something burning or is it me?" -- Joan of Arc
From pgsql-general-owner@postgresql.org Thu Oct 3 10:27:03 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 00D77475E82
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 10:27:02 -0400 (EDT)
Received: from clearmetrix.com (unknown [209.92.142.67])
by postgresql.org (Postfix) with ESMTP id 4C84D475C9E
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 10:27:01 -0400 (EDT)
Received: from clearmetrix.com (chw.muvpn.clearmetrix.com [172.16.1.3] (may be
forged))
by clearmetrix.com (8.11.6/linuxconf) with ESMTP id g93ER0V13724;
Thu, 3 Oct 2002 10:27:00 -0400
Message-ID: <3D9C53B3.2050508@clearmetrix.com>
Date: Thu, 03 Oct 2002 10:26:59 -0400
From: "Charles H. Woloszynski" <chw@clearmetrix.com>
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Large databases, performance
References: <3D9C8712.9513.9C6521D@localhost>
<3D9C9B8A.30310.A16469F@localhost>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/121
X-Sequence-Number: 31120
Forgive my ignorance, but what about 2.4.19-16 is that much faster? Are
we talking about 2x improvement for your tests? We are currently on
2.4.9 and looking at the performance and wondering... so any comments
are appreciated.
Charlie
Shridhar Daithankar wrote:
>And BTW, all these results were on reiserfs. We didn't found much of difference
>in write performance between them. So we stick to reiserfs. And of course we
>got the latest hot shot Mandrake9 with 2.4.19-16 which really made difference
>over RHL7.2..
>
>Bye
> Shridhar
>
>--
>QOTD: "Do you smell something burning or is it me?" -- Joan of Arc
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/users-lounge/docs/faq.html
>
>
--
Charles H. Woloszynski
ClearMetrix, Inc.
115 Research Drive
Bethlehem, PA 18015
tel: 610-419-2210 x400
fax: 240-371-3256
web: www.clearmetrix.com
From pgsql-general-owner@postgresql.org Thu Oct 3 11:49:44 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 6EFF2475D12
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 11:49:43 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id EFE17475C15
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 11:49:41 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g93FpDP03689
for <pgsql-general@postgresql.org>; Thu, 3 Oct 2002 21:21:13 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g93FpDv03684
for <pgsql-general@postgresql.org>; Thu, 3 Oct 2002 21:21:13 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-general <pgsql-general@postgresql.org>
Date: Thu, 03 Oct 2002 21:20:16 +0530
MIME-Version: 1.0
Subject: Re: Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3D9CB490.2412.A78039E@localhost>
In-reply-to: <3D9C53B3.2050508@clearmetrix.com>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/125
X-Sequence-Number: 31124
On 3 Oct 2002 at 10:26, Charles H. Woloszynski wrote:
> Forgive my ignorance, but what about 2.4.19-16 is that much faster? Are
> we talking about 2x improvement for your tests? We are currently on
> 2.4.9 and looking at the performance and wondering... so any comments
> are appreciated.
Well, for one thing, 2.4.19 contains backported O(1) scheduler patch which
improves SMP performance by heaps as task queue is per cpu rather than one per
system. I don't think any system routinely runs thousands of processes unless
it's a web/ftp/mail server. In that case improved scheduling wuld help as
well..
Besides there were major VM rewrites/changes after 2.4.10 which corrected
almost all the major VM fiaskos on linux. For anything VM intensive it's
recommended that you run 2.4.17 at least.
I would say it's worth going for it.
Bye
Shridhar
--
Sturgeon's Law: 90% of everything is crud.
From pgsql-general-owner@postgresql.org Thu Oct 3 11:56:15 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 260004767C0
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 11:56:13 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id 50F1D476759
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 11:56:11 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g93Fvfs04051
for <pgsql-general@postgresql.org>; Thu, 3 Oct 2002 21:27:41 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g93Fvfv04044;
Thu, 3 Oct 2002 21:27:41 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-general <pgsql-general@postgresql.org>
Date: Thu, 03 Oct 2002 21:26:43 +0530
MIME-Version: 1.0
Subject: Re: Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Cc: pgsql-hackers@postgresql.org
Message-ID: <3D9CB613.1700.A7DEEF0@localhost>
In-reply-to: <3D9C9B8A.30310.A16469F@localhost>
References: <Pine.LNX.4.21.0210031353540.26902-100000@ponder.fairway2k.co.uk>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/126
X-Sequence-Number: 31125
On 3 Oct 2002 at 19:33, Shridhar Daithankar wrote:
> On 3 Oct 2002 at 13:56, Nigel J. Andrews wrote:
> > It's one hell of a DB you're building. I'm sure I'm not the only one interested
> > so to satisfy those of us who are nosey: can you say what the application is?
> >
> > I'm sure we'll all understand if it's not possible for you mention such
> > information.
>
> Well, I can't tell everything but somethings I can..
>
> 1) This is a system that does not have online capability yet. This is an
> attempt to provide one.
>
> 2) The goal is to avoid costs like licensing oracle. I am sure this would make
> a great example for OSDB advocacy, which ever database wins..
>
> 3) The database size estimates, I put earlier i.e. 9 billion tuples/900GB data
> size, are in a fixed window. The data is generated from some real time systems.
> You can imagine the rate.
Read that fixed time window..
>
> 4) Further more there are timing restrictions attached to it. 5K inserts/sec.
> 4800 queries per hour with response time of 10 sec. each. It's this aspect that
> has forced us for partitioning..
>
> And contrary to my earlier information, this is going to be a live system
> rather than a back up one.. A better win to postgresql.. I hope it makes it.
>
> And BTW, all these results were on reiserfs. We didn't found much of difference
> in write performance between them. So we stick to reiserfs. And of course we
> got the latest hot shot Mandrake9 with 2.4.19-16 which really made difference
> over RHL7.2..
Well, we were comparing ext3 v/s reiserfs. I don't remember the journalling
mode of ext3 but we did a 10 GB write test. Besides converting the RAID to RAID-
0 from RAID-5 might have something to do about it.
There was a discussion on hackers some time back as in which file system is
better. I hope this might have an addition over it..
Bye
Shridhar
--
"What terrible way to die." "There are no good ways." -- Sulu and Kirk, "That
Which Survives", stardate unknown
From pgsql-general-owner@postgresql.org Thu Oct 3 12:01:42 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id E7F9D4766C8; Thu, 3 Oct 2002 12:01:39 -0400 (EDT)
Received: from briar.mmrd.com (unknown [208.255.226.182])
by postgresql.org (Postfix) with ESMTP
id 25AD3476664; Thu, 3 Oct 2002 12:01:39 -0400 (EDT)
Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100])
by briar.mmrd.com (8.11.2/8.11.2) with ESMTP id g93GxIF30272;
Thu, 3 Oct 2002 12:59:18 -0400
Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55])
by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id g93G1Zx29595;
Thu, 3 Oct 2002 12:01:35 -0400
Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP
(Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id TK2FXAW3; Thu, 3 Oct 2002 12:01:34 -0400
Subject: Re: Large databases, performance
From: Robert Treat <xzilla@users.sourceforge.net>
Reply-To: pgsql-performance@postgresql.org
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
"pankaj M. Tolani" <pankaj@pspl.co.in>
In-Reply-To: <3D9C8712.9513.9C6521D@localhost>
References: <3D9C8712.9513.9C6521D@localhost>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 03 Oct 2002 11:57:29 -0400
Message-Id: <1033660649.21324.53.camel@camel>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/128
X-Sequence-Number: 31127
NOTE: Setting follow up to the performance list
Funny that the status quo seems to be if you need fast selects on data
that has few inserts to pick mysql, otherwise if you have a lot of
inserts and don't need super fast selects go with PostgreSQL; yet your
data seems to cut directly against this.
I'm curious, did you happen to run the select tests while also running
the insert tests? IIRC the older mysql versions have to lock the table
when doing the insert, so select performance goes in the dumper in that
scenario, perhaps that's not an issue with 3.23.52?
It also seems like the vacuum after each insert is unnecessary, unless
your also deleting/updating data behind it. Perhaps just running an
ANALYZE on the table would suffice while reducing overhead.
Robert Treat
On Thu, 2002-10-03 at 08:36, Shridhar Daithankar wrote:
> Machine
> Compaq Proliant Server ML 530
> "Intel Xeon 2.4 Ghz Processor x 4, "
> "4 GB RAM, 5 x 72.8 GB SCSI HDD "
> "RAID 0 (Striping) Hardware Setup, Mandrake Linux 9.0"
> "Cost - $13,500 ($1,350 for each additional 72GB HDD)"
>
> Performance Parameter MySQL 3.23.52 MySQL 3.23.52 PostgreSQL 7.2.2
> WITHOUT InnoDB WITH InnoDB for with built-in support
> for transactional transactional support for transactions
> support
> Complete Data
>
> Inserts + building a composite index
> "40 GB data, 432,000,000 tuples" 3738 secs 18720 secs 20628 secs
> "about 100 bytes each, schema on
> 'schema' sheet"
> "composite index on 3 fields
> (esn, min, datetime)"
>
> Load Speed 115570 tuples/second 23076 tuples/second 20942 tuples/second
>
> Database Size on Disk 48 GB 87 GB 111 GB
>
> Average per partition
>
> Inserts + building a composite index
> "300MB data, 3,000,000 tuples," 28 secs 130 secs 150 secs
> "about 100 bytes each, schema on
> 'schema' sheet"
> "composite index on 3 fields
> (esn, min, datetime)"
>
> Select Query 7 secs 7 secs 6 secs
> based on equality match of 2 fields
> (esn and min) - 4 concurrent queries
> running
>
> Database Size on Disk 341 MB 619 MB 788 MB
> ----
From pgsql-general-owner@postgresql.org Thu Oct 3 12:07:27 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 75AB4476A9F
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:07:24 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id A6610476A98
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:07:22 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g93G8qH04685
for <pgsql-general@postgresql.org>; Thu, 3 Oct 2002 21:38:52 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g93G8qv04675;
Thu, 3 Oct 2002 21:38:52 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-hackers@postgresql.org, pgsql-general <pgsql-general@postgresql.org>
Date: Thu, 03 Oct 2002 21:37:55 +0530
MIME-Version: 1.0
Subject: Re: Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3D9CB8B3.25411.A882D21@localhost>
In-reply-to: <3D9C3E05.7070906@clearmetrix.com>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/130
X-Sequence-Number: 31129
On 3 Oct 2002 at 8:54, Charles H. Woloszynski wrote:
> Can you comment on the tools you are using to do the insertions (Perl,
> Java?) and the distribution of data (all random, all static), and the
> transaction scope (all inserts in one transaction, each insert as a
> single transaction, some group of inserts as a transaction).
Most proably it's all inserts in one transaction spread almost uniformly over
around 15-20 tables. Of course there will be bunch of transactions..
> I'd be curious what happens when you submit more queries than you have
> processors (you had four concurrent queries and four CPUs), if you care
> to run any additional tests. Also, I'd report the query time in
> absolute (like you did) and also in 'Time/number of concurrent queries".
> This will give you a sense of how the system is scaling as the workload
> increases. Personally I am more concerned about this aspect than the
> load time, since I am going to guess that this is where all the time is
> spent.
I don't think so. Because we plan to put enough shared buffers that would
almost contain the indexes in RAM if not data. Besides number of tuples
expected per query are not many. So more concurrent queries are not going to
hog anything other than CPU power at most.
Our major concern remains load time as data is generated in real time and is
expecetd in database with in specified time period. We need indexes for query
and inserting into indexed table is on hell of a job. We did attempt inserting
8GB of data in indexed table. It took almost 20 hours at 1K tuples per second
on average.. Though impressive it's not acceptable for that load..
>
> Was the original posting on GENERAL or HACKERS. Is this moving the
> PERFORMANCE for follow-up? I'd like to follow this discussion and want
> to know if I should join another group?
Shall I subscribe to performance? What's the exat list name? Benchmarks? I
don't see anything as performance mailing list on this page..
http://developer.postgresql.org/mailsub.php?devlp
> P.S. Anyone want to comment on their expectation for 'commercial'
> databases handling this load? I know that we cannot speak about
> specific performance metrics on some products (licensing restrictions)
> but I'd be curious if folks have seen some of the databases out there
> handle these dataset sizes and respond resonably.
Well, if something handles such kind of data with single machine and costs
under USD20K for entire setup, I would be willing to recommend that to client..
BTW we are trying same test on HP-UX. I hope we get some better figures on 64
bit machines..
Bye
Shridhar
--
Clarke's Conclusion: Never let your sense of morals interfere with doing the
right thing.
From pgsql-general-owner@postgresql.org Thu Oct 3 12:16:12 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 6A4E54766BA; Thu, 3 Oct 2002 12:16:11 -0400 (EDT)
Received: from new-smtp2.ihug.com.au (new-smtp2.ihug.com.au [203.109.250.28])
by postgresql.org (Postfix) with ESMTP
id 88893476606; Thu, 3 Oct 2002 12:16:10 -0400 (EDT)
Received: from p286-tnt1.mel.ihug.com.au (postgresql.org) [203.173.161.32]
by new-smtp2.ihug.com.au with esmtp (Exim 3.22 #1 (Debian))
id 17x8e0-0002c2-00; Fri, 04 Oct 2002 02:16:09 +1000
Message-ID: <3D9C6D46.CCDB3047@postgresql.org>
Date: Fri, 04 Oct 2002 02:16:06 +1000
From: Justin Clift <justin@postgresql.org>
X-Mailer: Mozilla 4.79 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-hackers@postgresql.org, pgsql-general <pgsql-general@postgresql.org>
Subject: Re: [HACKERS] Large databases, performance
References: <3D9CB8B3.25411.A882D21@localhost>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/134
X-Sequence-Number: 31133
Shridhar Daithankar wrote:
<snip>
> > Was the original posting on GENERAL or HACKERS. Is this moving the
> > PERFORMANCE for follow-up? I'd like to follow this discussion and want
> > to know if I should join another group?
>
> Shall I subscribe to performance? What's the exat list name? Benchmarks? I
> don't see anything as performance mailing list on this page..
> http://developer.postgresql.org/mailsub.php?devlp
It's a fairly new mailing list. :)
pgsql-performance@postgresql.org
Easiest way to subscribe is by emailing majordomo@postgresql.org with:
subscribe pgsql-performance
as the message body.
:-)
Regards and best wishes,
Justin Clift
<snip>
> Bye
> Shridhar
>
> --
> Clarke's Conclusion: Never let your sense of morals interfere with doing the
> right thing.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
From pgsql-general-owner@postgresql.org Thu Oct 3 12:16:51 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 3DDFC476B00
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:16:50 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id 4CDE247675B
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:16:29 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g93GI1E05284
for <pgsql-general@postgresql.org>; Thu, 3 Oct 2002 21:48:01 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g93GI1v05269;
Thu, 3 Oct 2002 21:48:01 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
"pankaj M. Tolani" <pankaj@pspl.co.in>
Date: Thu, 03 Oct 2002 21:47:03 +0530
MIME-Version: 1.0
Subject: Re: Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3D9CBAD7.23509.A908C61@localhost>
References: <3D9C8712.9513.9C6521D@localhost>
In-reply-to: <1033660649.21324.53.camel@camel>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/135
X-Sequence-Number: 31134
On 3 Oct 2002 at 11:57, Robert Treat wrote:
> NOTE: Setting follow up to the performance list
>
> Funny that the status quo seems to be if you need fast selects on data
> that has few inserts to pick mysql, otherwise if you have a lot of
> inserts and don't need super fast selects go with PostgreSQL; yet your
> data seems to cut directly against this.
Well, couple of things..
The number of inserts aren't few. it's 5000/sec.required in the field Secondly
I don't know really but postgresql seems doing pretty fine in parallel selects.
If we use mysql with transaction support then numbers are really close..
May be it's time to rewrite famous myth that postgresql is slow. When properly
tuned or given enough head room, it's almost as fast as mysql..
> I'm curious, did you happen to run the select tests while also running
> the insert tests? IIRC the older mysql versions have to lock the table
> when doing the insert, so select performance goes in the dumper in that
> scenario, perhaps that's not an issue with 3.23.52?
IMO even if it locks tables that shouldn't affect select performance. It would
be fun to watch when we insert multiple chunks of data and fire queries
concurrently. I would be surprised if mysql starts slowing down..
> It also seems like the vacuum after each insert is unnecessary, unless
> your also deleting/updating data behind it. Perhaps just running an
> ANALYZE on the table would suffice while reducing overhead.
I believe that was vacuum analyze only. But still it takes lot of time. Good
thing is it's not blocking..
Anyway I don't think such frequent vacuums are going to convince planner to
choose index scan over sequential scan. I am sure it's already convinced..
Regards,
Shridhar
-----------------------------------------------------------
Shridhar Daithankar
LIMS CPE Team Member, PSPL.
mailto:shridhar_daithankar@persistent.co.in
Phone:- +91-20-5678900 Extn.270
Fax :- +91-20-5678901
-----------------------------------------------------------
From pgsql-general-owner@postgresql.org Thu Oct 3 12:23:40 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 96B8E475B8C; Thu, 3 Oct 2002 12:23:39 -0400 (EDT)
Received: from CopelandConsulting.Net (dsl-24293-ld.customer.centurytel.net
[209.142.135.135]) by postgresql.org (Postfix) with ESMTP
id A04A547674F; Thu, 3 Oct 2002 12:23:37 -0400 (EDT)
Received: from mouse.copelandconsulting.net (mouse.copelandconsulting.net
[192.168.1.2])
by CopelandConsulting.Net (8.10.1/8.10.1) with ESMTP id g93GNMd20304;
Thu, 3 Oct 2002 11:23:23 -0500 (CDT)
X-Trade-Id: <CCC.Thu, 3 Oct 2002 11:23:23 -0500 (CDT).Thu,
3 Oct 2002 11:23:23 -0500
(CDT).200210031623.g93GNMd20304.g93GNMd20304@CopelandConsulting.Net.
Subject: Re: [HACKERS] Large databases, performance
From: Greg Copeland <greg@CopelandConsulting.Net>
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-general <pgsql-general@postgresql.org>,
PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>
In-Reply-To: <3D9CB613.1700.A7DEEF0@localhost>
References: <Pine.LNX.4.21.0210031353540.26902-100000@ponder.fairway2k.co.uk>
<3D9CB613.1700.A7DEEF0@localhost>
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="=-UufspPzcV77dAnLY19zJ"
X-Mailer: Ximian Evolution 1.0.8
Date: 03 Oct 2002 11:23:28 -0500
Message-Id: <1033662208.13005.22.camel@mouse.copelandconsulting.net>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/137
X-Sequence-Number: 31136
--=-UufspPzcV77dAnLY19zJ
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
On Thu, 2002-10-03 at 10:56, Shridhar Daithankar wrote:
> Well, we were comparing ext3 v/s reiserfs. I don't remember the journalli=
ng=20
> mode of ext3 but we did a 10 GB write test. Besides converting the RAID t=
o RAID-
> 0 from RAID-5 might have something to do about it.
>=20
> There was a discussion on hackers some time back as in which file system =
is=20
> better. I hope this might have an addition over it..
Hmm. Reiserfs' claim to fame is it's low latency with many, many small
files and that it's journaled. I've never seem anyone comment about it
being considered an extremely fast file system in an general computing
context nor have I seen any even hint at it as a file system for use in
heavy I/O databases. This is why Reiserfs is popular with news and
squid cache servers as it's almost an ideal fit. That is, tons of small
files or directories contained within a single directory. As such, I'm
very surprised that reiserfs is even in the running for your comparison.
Might I point you toward XFS, JFS, or ext3, ? As I understand it, XFS
and JFS are going to be your preferred file systems for for this type of
application with XFS in the lead as it's tool suite is very rich and
robust. I'm actually lacking JFS experience but from what I've read,
it's a notch or two back from XFS in robustness (assuming we are talking
Linux here). Feel free to read and play to find out for your self. I'd
recommend that you start playing with XFS to see how the others
compare. After all, XFS' specific claim to fame is high throughput w/
low latency on large and very large files. Furthermore, they even have
a real time mechanism that you can further play with to see how it
effects your throughput and/or latencies.
Greg
--=-UufspPzcV77dAnLY19zJ
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
iD8DBQA9nG7/4lr1bpbcL6kRAseVAJwLTzthd4qA47FItNsq5IWk2LPeZACfeoR8
jeimwzplmrQ8azABtU/ZxEI=
=K7BL
-----END PGP SIGNATURE-----
--=-UufspPzcV77dAnLY19zJ--
From pgsql-performance-owner@postgresql.org Thu Oct 3 12:30:36 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 8B3574761D7
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 12:30:35 -0400 (EDT)
Received: from briar.mmrd.com (unknown [208.255.226.182])
by postgresql.org (Postfix) with ESMTP id ECCE4476072
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 12:30:34 -0400 (EDT)
Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100])
by briar.mmrd.com (8.11.2/8.11.2) with ESMTP id g93HSMF00312;
Thu, 3 Oct 2002 13:28:22 -0400
Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55])
by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id g93GUex30019;
Thu, 3 Oct 2002 12:30:40 -0400
Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP
(Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id TK2FXA5P; Thu, 3 Oct 2002 12:30:38 -0400
Subject: Re: Large databases, performance
From: Robert Treat <xzilla@users.sourceforge.net>
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-performance@postgresql.org
In-Reply-To: <3D9CBAD7.23509.A908C61@localhost>
References: <3D9C8712.9513.9C6521D@localhost>
<3D9CBAD7.23509.A908C61@localhost>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 03 Oct 2002 12:26:34 -0400
Message-Id: <1033662394.21324.59.camel@camel>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/9
X-Sequence-Number: 26
On Thu, 2002-10-03 at 12:17, Shridhar Daithankar wrote:
> On 3 Oct 2002 at 11:57, Robert Treat wrote:
> May be it's time to rewrite famous myth that postgresql is slow.
That myth has been dis-proven long ago, it just takes awhile for
everyone to catch on ;-)
When properly
> tuned or given enough head room, it's almost as fast as mysql..
>
> > I'm curious, did you happen to run the select tests while also running
> > the insert tests? IIRC the older mysql versions have to lock the table
> > when doing the insert, so select performance goes in the dumper in that
> > scenario, perhaps that's not an issue with 3.23.52?
>
> IMO even if it locks tables that shouldn't affect select performance. It would
> be fun to watch when we insert multiple chunks of data and fire queries
> concurrently. I would be surprised if mysql starts slowing down..
>
Hmm... been awhile since I dug into mysql internals, but IIRC once the
table was locked, you had to wait for the insert to complete so the
table would be unlocked and the select could go through. (maybe this is
a myth that I need to get clued in on)
> > It also seems like the vacuum after each insert is unnecessary, unless
> > your also deleting/updating data behind it. Perhaps just running an
> > ANALYZE on the table would suffice while reducing overhead.
>
> I believe that was vacuum analyze only. But still it takes lot of time. Good
> thing is it's not blocking..
>
> Anyway I don't think such frequent vacuums are going to convince planner to
> choose index scan over sequential scan. I am sure it's already convinced..
>
My thinking was that if your just doing inserts, you need to update the
statistics but don't need to check on unused tuples.
Robert Treat
From pgsql-performance-owner@postgresql.org Thu Oct 3 12:29:19 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id AA6C4476340
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 12:29:17 -0400 (EDT)
Received: from slammer.netnation.com (slammer.netnation.com [204.174.223.62])
by postgresql.org (Postfix) with ESMTP id 3A7484761D7
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 12:29:17 -0400 (EDT)
Received: from [10.10.10.11] (helo=mikeb.staff.netnation.com)
by slammer.netnation.com with esmtp (Exim 3.36 #1)
id 17x8qn-0005Jo-00
for pgsql-performance@postgresql.org; Thu, 03 Oct 2002 09:29:21 -0700
Subject: subscribe pgsql-performance
From: Mike Benoit <mikeb@netnation.com>
To: pgsql-performance@postgresql.org
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8-3mdk
Date: 03 Oct 2002 09:29:21 -0700
Message-Id: <1033662562.31473.2.camel@mikeb.staff.netnation.com>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/8
X-Sequence-Number: 25
subscribe pgsql-performance
--
Best Regards,
Mike Benoit
NetNation Communication Inc.
Systems Engineer
Tel: 604-684-6892 or 888-983-6600
---------------------------------------
Disclaimer: Opinions expressed here are my own and not
necessarily those of my employer
From pgsql-general-owner@postgresql.org Thu Oct 3 12:29:48 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id B58A54761D7
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:29:46 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id C9C8947604E
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:29:44 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g93GVGe06213
for <pgsql-general@postgresql.org>; Thu, 3 Oct 2002 22:01:16 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g93GVGv06203;
Thu, 3 Oct 2002 22:01:16 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: Greg Copeland <greg@copelandconsulting.net>
Date: Thu, 03 Oct 2002 22:00:18 +0530
MIME-Version: 1.0
Subject: Re: [HACKERS] Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Cc: pgsql-general <pgsql-general@postgresql.org>,
PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>,
"pankaj M. Tolani" <pankaj@pspl.co.in>
Message-ID: <3D9CBDF2.27020.A9CACCF@localhost>
References: <3D9CB613.1700.A7DEEF0@localhost>
In-reply-to: <1033662208.13005.22.camel@mouse.copelandconsulting.net>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/138
X-Sequence-Number: 31137
On 3 Oct 2002 at 11:23, Greg Copeland wrote:
> On Thu, 2002-10-03 at 10:56, Shridhar Daithankar wrote:
> > Well, we were comparing ext3 v/s reiserfs. I don't remember the journalling
> > mode of ext3 but we did a 10 GB write test. Besides converting the RAID to RAID-
> > 0 from RAID-5 might have something to do about it.
> >
> > There was a discussion on hackers some time back as in which file system is
> > better. I hope this might have an addition over it..
>
>
> Hmm. Reiserfs' claim to fame is it's low latency with many, many small
> files and that it's journaled. I've never seem anyone comment about it
> being considered an extremely fast file system in an general computing
> context nor have I seen any even hint at it as a file system for use in
> heavy I/O databases. This is why Reiserfs is popular with news and
> squid cache servers as it's almost an ideal fit. That is, tons of small
> files or directories contained within a single directory. As such, I'm
> very surprised that reiserfs is even in the running for your comparison.
>
> Might I point you toward XFS, JFS, or ext3, ? As I understand it, XFS
> and JFS are going to be your preferred file systems for for this type of
> application with XFS in the lead as it's tool suite is very rich and
> robust. I'm actually lacking JFS experience but from what I've read,
> it's a notch or two back from XFS in robustness (assuming we are talking
> Linux here). Feel free to read and play to find out for your self. I'd
> recommend that you start playing with XFS to see how the others
> compare. After all, XFS' specific claim to fame is high throughput w/
> low latency on large and very large files. Furthermore, they even have
> a real time mechanism that you can further play with to see how it
> effects your throughput and/or latencies.
I would try that. Once we are thr. with tests at our hands..
Bye
Shridhar
--
"The combination of a number of things to make existence worthwhile." "Yes,
the philosophy of 'none,' meaning 'all.'" -- Spock and Lincoln, "The Savage
Curtain", stardate 5906.4
From pgsql-performance-owner@postgresql.org Thu Oct 3 12:34:53 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 5D09847604E
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 12:34:52 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id A15E4475EF0
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 12:34:49 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g93GaLj06534
for <pgsql-performance@postgresql.org>; Thu, 3 Oct 2002 22:06:21 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g93GaLv06529;
Thu, 3 Oct 2002 22:06:21 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-performance@postgresql.org
Date: Thu, 03 Oct 2002 22:05:24 +0530
MIME-Version: 1.0
Subject: Re: Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Cc: "pankaj M. Tolani" <pankaj@pspl.co.in>
Message-ID: <3D9CBF24.4516.AA1560C@localhost>
References: <3D9CBAD7.23509.A908C61@localhost>
In-reply-to: <1033662394.21324.59.camel@camel>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/10
X-Sequence-Number: 27
On 3 Oct 2002 at 12:26, Robert Treat wrote:
> On Thu, 2002-10-03 at 12:17, Shridhar Daithankar wrote:
> > On 3 Oct 2002 at 11:57, Robert Treat wrote:
> > May be it's time to rewrite famous myth that postgresql is slow.
>
> That myth has been dis-proven long ago, it just takes awhile for
> everyone to catch on ;-)
:-)
> Hmm... been awhile since I dug into mysql internals, but IIRC once the
> table was locked, you had to wait for the insert to complete so the
> table would be unlocked and the select could go through. (maybe this is
> a myth that I need to get clued in on)
If that turns out to be true, I guess mysql will nose dive out of window.. May
be time to run a test that's nearer to real world expectation, especially in
terms on concurrency..
I don't think tat will be an issue with mysql with transaction support. The
vanilla one might suffer.. Not the other one.. At least theoretically..
> My thinking was that if your just doing inserts, you need to update the
> statistics but don't need to check on unused tuples.
Any other way of doing that other than vacuum analyze? I thought that was the
only way..
Bye
Shridhar
--
"Even more amazing was the realization that God has Internet access. Iwonder
if He has a full newsfeed?"(By Matt Welsh)
From pgsql-general-owner@postgresql.org Thu Oct 3 12:43:03 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id E66324762F3
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:43:01 -0400 (EDT)
Received: from email01.aon.at (WARSL402PIP3.highway.telekom.at [195.3.96.97])
by postgresql.org (Postfix) with SMTP id E4F704769D2
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:42:52 -0400 (EDT)
Received: (qmail 383094 invoked from network); 3 Oct 2002 16:41:49 -0000
Received: from m165p020.dipool.highway.telekom.at (HELO cantor)
([62.46.10.148]) (envelope-sender <mkoi-pg@aon.at>)
by qmail1rs.highway.telekom.at (qmail-ldap-1.03) with SMTP
for <shridhar?daithankar@persistent.co.in>; 3 Oct 2002 16:41:49 -0000
From: Manfred Koizar <mkoi-pg@aon.at>
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
"pankaj M. Tolani" <pankaj@pspl.co.in>
Subject: Re: Large databases, performance
Date: Thu, 03 Oct 2002 18:44:09 +0200
Message-ID: <onsopucciqfacce3mdnn0frv0tnnb54kui@4ax.com>
References: <3D9C8712.9513.9C6521D@localhost>
In-Reply-To: <3D9C8712.9513.9C6521D@localhost>
X-Mailer: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/141
X-Sequence-Number: 31140
On Thu, 03 Oct 2002 18:06:10 +0530, "Shridhar Daithankar"
<shridhar_daithankar@persistent.co.in> wrote:
>Machine
>Compaq Proliant Server ML 530
>"Intel Xeon 2.4 Ghz Processor x 4, "
>"4 GB RAM, 5 x 72.8 GB SCSI HDD "
>"RAID 0 (Striping) Hardware Setup, Mandrake Linux 9.0"
Shridhar,
forgive me if I ask what has been said before: Did you run at 100%
CPU or was IO bandwidth your limit? And is the answer the same for
all three configurations?
Servus
Manfred
From pgsql-general-owner@postgresql.org Fri Oct 4 09:10:05 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 55179476072
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:45:10 -0400 (EDT)
Received: from bachata.cybertec.at (unknown [62.116.21.146])
by postgresql.org (Postfix) with SMTP id F3F45475F5F
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:45:08 -0400 (EDT)
Received: (qmail 24137 invoked from network); 3 Oct 2002 16:45:18 -0000
Received: from unknown (HELO cybertec.at) (62.116.21.147)
by 62.116.21.146 with SMTP; 3 Oct 2002 16:45:18 -0000
Message-ID: <3D9C7579.2010206@cybertec.at>
Date: Thu, 03 Oct 2002 18:51:05 +0200
From: =?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <postgres@cybertec.at>
Reply-To: hs@cybertec.at
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: shridhar_daithankar@persistent.co.in,
pgsql-performance@postgresql.org, pgsql-general@postgresql.org
Subject: Re: [HACKERS] Large databases, performance
References: <3D9C8712.9513.9C6521D@localhost>
<3D9CBAD7.23509.A908C61@localhost>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/195
X-Sequence-Number: 31193
Shridhar Daithankar wrote:
>On 3 Oct 2002 at 11:57, Robert Treat wrote:
>
>
>
>>NOTE: Setting follow up to the performance list
>>
>>Funny that the status quo seems to be if you need fast selects on data
>>that has few inserts to pick mysql, otherwise if you have a lot of
>>inserts and don't need super fast selects go with PostgreSQL; yet your
>>data seems to cut directly against this.
>>
>>
>
>Well, couple of things..
>
>The number of inserts aren't few. it's 5000/sec.required in the field Secondly
>I don't know really but postgresql seems doing pretty fine in parallel selects.
>If we use mysql with transaction support then numbers are really close..
>
>May be it's time to rewrite famous myth that postgresql is slow. When properly
>tuned or given enough head room, it's almost as fast as mysql..
>
>
In the case of concurrent transactions MySQL does not do as well due to
very bad locking behavious. PostgreSQL is far better because it does row
level locking instead of table locking.
If you have many concurrent transactions MySQL performs some sort of
"self-denial-of-service". I'd choose PostgreSQL in order to make sure
that the database does not block.
>>I'm curious, did you happen to run the select tests while also running
>>the insert tests? IIRC the older mysql versions have to lock the table
>>when doing the insert, so select performance goes in the dumper in that
>>scenario, perhaps that's not an issue with 3.23.52?
>>
>>
>
>IMO even if it locks tables that shouldn't affect select performance. It would
>be fun to watch when we insert multiple chunks of data and fire queries
>concurrently. I would be surprised if mysql starts slowing down..
>
>
In the case of concurrent SELECTs and INSERT/UPDATE/DELETE operations
MySQL will slow down for sure. The more concurrent transactions you have
the worse MySQL will be.
>>It also seems like the vacuum after each insert is unnecessary, unless
>>your also deleting/updating data behind it. Perhaps just running an
>>ANALYZE on the table would suffice while reducing overhead.
>>
>>
>
>I believe that was vacuum analyze only. But still it takes lot of time. Good
>thing is it's not blocking..
>
>Anyway I don't think such frequent vacuums are going to convince planner to
>choose index scan over sequential scan. I am sure it's already convinced..
>
>
PostgreSQL allows you to improve execution plans by giving the planner a
hint.
In addition to that: if you need REAL performance and if you are running
similar queries consider using SPI.
Also: 7.3 will support PREPARE/EXECUTE.
If you are running MySQL you will not be able to add features to the
database easily.
In the case of PostgreSQL you have a broad range of simple interfaces
which make many things pretty simple (eg. optimized data types in < 50
lines of C code).
PostgreSQL is the database of the future and you can perform a lot of
tuning.
MySQL is a simple frontend to a filesystem and it is fast as long as you
are doing SELECT 1+1 operations.
Also: Keep in mind that PostgreSQL has a wonderful core team. MySQL is
built on Monty Widenius and the core team = Monty.
Also: PostgreSQL = ANSI compilant, MySQL = Monty compliant
In the past few years I have seen that there is no database system which
can beat PostgreSQL's flexibility and stability.
I am familiar with various database systems but believe: PostgreSQL is
the best choice.
Hans
>Regards,
> Shridhar
>
>-----------------------------------------------------------
>Shridhar Daithankar
>LIMS CPE Team Member, PSPL.
>mailto:shridhar_daithankar@persistent.co.in
>Phone:- +91-20-5678900 Extn.270
>Fax :- +91-20-5678901
>-----------------------------------------------------------
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://archives.postgresql.org
>
>
--
*Cybertec Geschwinde u Schoenig*
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/1/913 68 09; +43/664/233 90 75
www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at
<http://cluster.postgresql.at>, www.cybertec.at
<http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at>
From pgsql-general-owner@postgresql.org Thu Oct 3 12:51:10 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 3CB38476265
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:51:08 -0400 (EDT)
Received: from email04.aon.at (WARSL402PIP5.highway.telekom.at [195.3.96.79])
by postgresql.org (Postfix) with SMTP id C833D4761D7
for <pgsql-general@postgresql.org>;
Thu, 3 Oct 2002 12:51:06 -0400 (EDT)
Received: (qmail 364996 invoked from network); 3 Oct 2002 16:51:12 -0000
Received: from m165p020.dipool.highway.telekom.at (HELO cantor)
([62.46.10.148]) (envelope-sender <mkoi-pg@aon.at>)
by qmail5rs.highway.telekom.at (qmail-ldap-1.03) with SMTP
for <shridhar?daithankar@persistent.co.in>; 3 Oct 2002 16:51:12 -0000
From: Manfred Koizar <mkoi-pg@aon.at>
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
"pankaj M. Tolani" <pankaj@pspl.co.in>
Subject: Re: [HACKERS] Large databases, performance
Date: Thu, 03 Oct 2002 18:53:32 +0200
Message-ID: <latopug1vl51769nkn3rj2ltdhjvqrbfof@4ax.com>
References: <3D9C8712.9513.9C6521D@localhost>
<1033660649.21324.53.camel@camel>
<3D9CBAD7.23509.A908C61@localhost>
In-Reply-To: <3D9CBAD7.23509.A908C61@localhost>
X-Mailer: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/142
X-Sequence-Number: 31141
On Thu, 03 Oct 2002 21:47:03 +0530, "Shridhar Daithankar"
<shridhar_daithankar@persistent.co.in> wrote:
>I believe that was vacuum analyze only.
Well there is
VACUUM [tablename];
and there is
ANALYZE [tablename];
And
VACUUM ANALYZE [tablename];
is VACUUM followed by ANALYZE.
Servus
Manfred
From pgsql-performance-owner@postgresql.org Thu Oct 3 12:52:31 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id DEE8B4768CD
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 12:52:30 -0400 (EDT)
Received: from bachata.cybertec.at (unknown [62.116.21.146])
by postgresql.org (Postfix) with SMTP id F3AAE4768C4
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 12:52:29 -0400 (EDT)
Received: (qmail 24627 invoked from network); 3 Oct 2002 16:52:39 -0000
Received: from unknown (HELO cybertec.at) (62.116.21.147)
by 62.116.21.146 with SMTP; 3 Oct 2002 16:52:39 -0000
Message-ID: <3D9C7732.9080306@cybertec.at>
Date: Thu, 03 Oct 2002 18:58:26 +0200
From: =?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <hs@cybertec.at>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: pgsql-performance@postgresql.org
Subject: unsubscribe
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/13
X-Sequence-Number: 30
unsubscribe
--
*Cybertec Geschwinde u Schoenig*
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/1/913 68 09; +43/664/233 90 75
www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at
<http://cluster.postgresql.at>, www.cybertec.at
<http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at>
From pgsql-performance-owner@postgresql.org Thu Oct 3 13:41:02 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 4F95847648F
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 13:40:59 -0400 (EDT)
Received: from lakemtao04.cox.net (lakemtao04.cox.net [68.1.17.241])
by postgresql.org (Postfix) with ESMTP id 93BB0476482
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 13:40:58 -0400 (EDT)
Received: from localhost.localdomain ([68.11.66.83]) by lakemtao04.cox.net
(InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP
id <20021003174059.OZMW1315.lakemtao04.cox.net@localhost.localdomain>
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 13:40:59 -0400
Subject: Re: Large databases, performance
From: Ron Johnson <ron.l.johnson@cox.net>
To: pgsql-performance@postgresql.org
In-Reply-To: <3D9CBAD7.23509.A908C61@localhost>
References: <3D9C8712.9513.9C6521D@localhost>
<3D9CBAD7.23509.A908C61@localhost>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 03 Oct 2002 12:38:49 -0500
Message-Id: <1033666730.28946.64.camel@haggis>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/14
X-Sequence-Number: 31
On Thu, 2002-10-03 at 11:17, Shridhar Daithankar wrote:
> On 3 Oct 2002 at 11:57, Robert Treat wrote:
>
[snip]
> > I'm curious, did you happen to run the select tests while also running
> > the insert tests? IIRC the older mysql versions have to lock the table
> > when doing the insert, so select performance goes in the dumper in that
> > scenario, perhaps that's not an issue with 3.23.52?
>
> IMO even if it locks tables that shouldn't affect select performance. It would
> be fun to watch when we insert multiple chunks of data and fire queries
> concurrently. I would be surprised if mysql starts slowing down..
What kind of lock? Shared lock or exclusive lock? If SELECT
performance tanked when doing simultaneous INSERTs, then maybe there
were exclusive table locks.
--
+------------------------------------------------------------+
| Ron Johnson, Jr. mailto:ron.l.johnson@cox.net |
| Jefferson, LA USA http://members.cox.net/ron.l.johnson |
| |
| "What other evidence do you have that they are terrorists, |
| other than that they trained in these camps?" |
| 17-Sep-2002 Katie Couric to an FBI agent regarding the 5 |
| men arrested near Buffalo NY |
+------------------------------------------------------------+
From pgsql-performance-owner@postgresql.org Thu Oct 3 16:57:46 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 48CBB475AA1
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 16:57:44 -0400 (EDT)
Received: from lakemtao02.cox.net (lakemtao02.cox.net [68.1.17.243])
by postgresql.org (Postfix) with ESMTP id A063C475A09
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 16:57:43 -0400 (EDT)
Received: from localhost.localdomain ([68.11.66.83]) by lakemtao02.cox.net
(InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP
id <20021003205743.MIEH12192.lakemtao02.cox.net@localhost.localdomain>
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 16:57:43 -0400
Subject: Re: [HACKERS] Large databases, performance
From: Ron Johnson <ron.l.johnson@cox.net>
To: pgsql-performance@postgresql.org
In-Reply-To: <3D9C7579.2010206@cybertec.at>
References: <3D9C8712.9513.9C6521D@localhost>
<3D9CBAD7.23509.A908C61@localhost> <3D9C7579.2010206@cybertec.at>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Mailer: Ximian Evolution 1.0.8
Date: 03 Oct 2002 15:55:35 -0500
Message-Id: <1033678535.28946.158.camel@haggis>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/15
X-Sequence-Number: 32
On Thu, 2002-10-03 at 11:51, Hans-J=FCrgen Sch=F6nig wrote:
> Shridhar Daithankar wrote:
>=20
> >On 3 Oct 2002 at 11:57, Robert Treat wrote:
[snip]
> PostgreSQL allows you to improve execution plans by giving the planner a=
=20
> hint.
> In addition to that: if you need REAL performance and if you are running=
=20
> similar queries consider using SPI.
What is SPI?
--=20
+------------------------------------------------------------+
| Ron Johnson, Jr. mailto:ron.l.johnson@cox.net |
| Jefferson, LA USA http://members.cox.net/ron.l.johnson |
| |
| "What other evidence do you have that they are terrorists, |
| other than that they trained in these camps?" |
| 17-Sep-2002 Katie Couric to an FBI agent regarding the 5 |
| men arrested near Buffalo NY |
+------------------------------------------------------------+
From pgsql-performance-owner@postgresql.org Thu Oct 3 17:09:21 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 9ED65476187
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 17:09:19 -0400 (EDT)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id C485647616D
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 17:09:18 -0400 (EDT)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 17xDDk-0001Ue-00
for <pgsql-performance@postgresql.org>; Thu, 03 Oct 2002 17:09:20 -0400
Date: Thu, 3 Oct 2002 17:09:20 -0400
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: [HACKERS] Large databases, performance
Message-ID: <20021003170920.X18497@mail.libertyrms.com>
Reply-To: pgsql-performance@postgresql.org
Mail-Followup-To: pgsql-performance@postgresql.org
References: <3D9C8712.9513.9C6521D@localhost>
<3D9CBAD7.23509.A908C61@localhost> <3D9C7579.2010206@cybertec.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <3D9C7579.2010206@cybertec.at>;
from postgres@cybertec.at on Thu, Oct 03, 2002 at 06:51:05PM +0200
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/17
X-Sequence-Number: 34
On Thu, Oct 03, 2002 at 06:51:05PM +0200, Hans-J?rgen Sch?nig wrote:
> In the case of concurrent transactions MySQL does not do as well due to
> very bad locking behavious. PostgreSQL is far better because it does row
> level locking instead of table locking.
It is my understanding that MySQL no longer does this on InnoDB
tables. Whether various bag-on-the-side table types are a good thing
I will leave to others; but there's no reason to go 'round making
claims about old versions of MySQL any more than there is a reason to
continue to talk about PostgreSQL not being crash safe. MySQL has
moved along nearly as quickly as PostgreSQL.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-performance-owner@postgresql.org Thu Oct 3 17:02:38 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 98D55476265
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 17:02:36 -0400 (EDT)
Received: from beamish.nsd.ca (unknown [205.150.156.194])
by postgresql.org (Postfix) with ESMTP id E0E64476264
for <pgsql-performance@postgresql.org>;
Thu, 3 Oct 2002 17:02:35 -0400 (EDT)
Received: (from smap@localhost) by beamish.nsd.ca (8.9.3/8.9.3) id RAA18011
for <pgsql-performance@postgresql.org>; Thu, 3 Oct 2002 17:02:37 -0400
X-Authentication-Warning: beamish.nsd.ca: smap set sender to <jllachan@nsd.ca>
using -f
Received: from reddog.nsd.ca(192.168.101.30) by beamish.nsd.ca via smap
(V2.1/2.1+anti-relay+anti-spam)
id xma018009; Thu, 3 Oct 02 17:02:31 -0400
Received: from nsd.ca (jllachan-linux.nsd.ca [192.168.101.148])
by reddog.nsd.ca (8.8.7/8.8.7) with ESMTP id RAA22887
for <pgsql-performance@postgresql.org>; Thu, 3 Oct 2002 17:02:13 -0400
Message-ID: <3D9CB2A2.47A4F6F1@nsd.ca>
Date: Thu, 03 Oct 2002 17:12:02 -0400
From: Jean-Luc Lachance <jllachan@nsd.ca>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.9-31 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-performance@postgresql.org
Subject: use [PERF] instead of
References: <3D9C8712.9513.9C6521D@localhost>
<3D9CBAD7.23509.A908C61@localhost> <3D9C7579.2010206@cybertec.at>
<1033678535.28946.158.camel@haggis>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by reddog.nsd.ca id
RAA22887
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/16
X-Sequence-Number: 33
May I suggest that instead of [pgsql-performance] that [PERF] be used to
save some of the subject line.
Ron Johnson wrote:
>=20
> On Thu, 2002-10-03 at 11:51, Hans-J=FCrgen Sch=F6nig wrote:
> > Shridhar Daithankar wrote:
> >
> > >On 3 Oct 2002 at 11:57, Robert Treat wrote:
> [snip]
> > PostgreSQL allows you to improve execution plans by giving the planner a
> > hint.
> > In addition to that: if you need REAL performance and if you are running
> > similar queries consider using SPI.
>=20
> What is SPI?
>=20
> --
> +------------------------------------------------------------+
> | Ron Johnson, Jr. mailto:ron.l.johnson@cox.net |
> | Jefferson, LA USA http://members.cox.net/ron.l.johnson |
> | |
> | "What other evidence do you have that they are terrorists, |
> | other than that they trained in these camps?" |
> | 17-Sep-2002 Katie Couric to an FBI agent regarding the 5 |
> | men arrested near Buffalo NY |
> +------------------------------------------------------------+
>=20
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
From pgsql-hackers-owner@postgresql.org Thu Oct 3 19:09:58 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 89E1D476450
for <pgsql-hackers@postgresql.org>;
Thu, 3 Oct 2002 19:09:56 -0400 (EDT)
Received: from slammer.netnation.com (slammer.netnation.com [204.174.223.62])
by postgresql.org (Postfix) with ESMTP id 540244762E0
for <pgsql-hackers@postgresql.org>;
Thu, 3 Oct 2002 19:09:54 -0400 (EDT)
Received: from [10.10.10.11] (helo=mikeb.staff.netnation.com)
by slammer.netnation.com with esmtp (Exim 3.36 #1)
id 17xF6S-0004uw-00
for pgsql-hackers@postgreSQL.org; Thu, 03 Oct 2002 16:09:56 -0700
Subject: Re: [GENERAL] Performance while loading data and indexing
From: Mike Benoit <mikeb@netnation.com>
To: pgsql-hackers@postgreSQL.org
In-Reply-To: <m3ptv0ib90.fsf@varsoon.wireboard.com>
References: <200209262141.g8QLfMr09064@candle.pha.pa.us>
<m3ptv0ib90.fsf@varsoon.wireboard.com>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8-3mdk
Date: 03 Oct 2002 16:09:56 -0700
Message-Id: <1033686597.31473.125.camel@mikeb.staff.netnation.com>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/178
X-Sequence-Number: 29947
Some of you may be interested in this seemingly exhaustive benchmark
between ext2/3, ReiserFS, JFS, and XFS.
http://www.osdl.org/presentations/lwe-jgfs.pdf
From pgsql-hackers-owner@postgresql.org Thu Oct 3 19:35:53 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 06F03475AA1
for <pgsql-hackers@postgresql.org>;
Thu, 3 Oct 2002 19:35:51 -0400 (EDT)
Received: from CopelandConsulting.Net (dsl-24293-ld.customer.centurytel.net
[209.142.135.135])
by postgresql.org (Postfix) with ESMTP id 90432475F6A
for <pgsql-hackers@postgresql.org>;
Thu, 3 Oct 2002 19:35:40 -0400 (EDT)
Received: from mouse.copelandconsulting.net (mouse.copelandconsulting.net
[192.168.1.2])
by CopelandConsulting.Net (8.10.1/8.10.1) with ESMTP id g93NZPd17537;
Thu, 3 Oct 2002 18:35:26 -0500 (CDT)
X-Trade-Id: <CCC.Thu, 3 Oct 2002 18:35:26 -0500 (CDT).Thu,
3 Oct 2002 18:35:26 -0500
(CDT).200210032335.g93NZPd17537.g93NZPd17537@CopelandConsulting.Net.
Subject: Re: [GENERAL] Performance while loading data and indexing
From: Greg Copeland <greg@CopelandConsulting.Net>
To: Mike Benoit <mikeb@netnation.com>
Cc: PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>
In-Reply-To: <1033686597.31473.125.camel@mikeb.staff.netnation.com>
References: <200209262141.g8QLfMr09064@candle.pha.pa.us>
<m3ptv0ib90.fsf@varsoon.wireboard.com>
<1033686597.31473.125.camel@mikeb.staff.netnation.com>
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="=-BuYK0VVffYM+zNI+A4b0"
X-Mailer: Ximian Evolution 1.0.8
Date: 03 Oct 2002 18:35:34 -0500
Message-Id: <1033688135.13005.28.camel@mouse.copelandconsulting.net>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/180
X-Sequence-Number: 29949
--=-BuYK0VVffYM+zNI+A4b0
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Hey, excellent. Thanks!
Based on that, it appears that XFS is a pretty good FS to use. For me,
the real surprise was how well reiserfs performed.
Greg
On Thu, 2002-10-03 at 18:09, Mike Benoit wrote:
> Some of you may be interested in this seemingly exhaustive benchmark
> between ext2/3, ReiserFS, JFS, and XFS.
>=20
> http://www.osdl.org/presentations/lwe-jgfs.pdf
>=20
>=20
>=20
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>=20
> http://archives.postgresql.org
--=-BuYK0VVffYM+zNI+A4b0
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
iD8DBQA9nNRG4lr1bpbcL6kRAjiYAJsFu0Zzy9SypyS71KkTsIUCu93D+wCfV7Sl
pDPuo2tpeJBVZJzbcnN9WDs=
=IsJZ
-----END PGP SIGNATURE-----
--=-BuYK0VVffYM+zNI+A4b0--
From pgsql-hackers-owner@postgresql.org Thu Oct 3 20:01:32 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 175E947600E
for <pgsql-hackers@postgresql.org>;
Thu, 3 Oct 2002 20:01:31 -0400 (EDT)
Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251])
by postgresql.org (Postfix) with ESMTP id B5F71475B84
for <pgsql-hackers@postgresql.org>;
Thu, 3 Oct 2002 20:01:18 -0400 (EDT)
Received: (from pgman@localhost)
by candle.pha.pa.us (8.11.6/8.10.1) id g93NxuZ07976;
Thu, 3 Oct 2002 19:59:56 -0400 (EDT)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200210032359.g93NxuZ07976@candle.pha.pa.us>
Subject: Re: [GENERAL] Performance while loading data and indexing
In-Reply-To: <1033688135.13005.28.camel@mouse.copelandconsulting.net>
To: Greg Copeland <greg@CopelandConsulting.Net>
Date: Thu, 3 Oct 2002 19:59:56 -0400 (EDT)
Cc: Mike Benoit <mikeb@netnation.com>,
PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>
X-Mailer: ELM [version 2.4ME+ PL99 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/184
X-Sequence-Number: 29953
Greg Copeland wrote:
-- Start of PGP signed section.
> Hey, excellent. Thanks!
>
> Based on that, it appears that XFS is a pretty good FS to use. For me,
> the real surprise was how well reiserfs performed.
>
OK, hardware performance paper updated:
---------------------------------------------------------------------------
File system choice is particularly difficult on Linux because there are
so many file system choices, and none of them are optimal: ext2 is not
entirely crash-safe, ext3, xfs, and jfs are journal-based, and Reiser is
optimized for small files and does journalling. The journalling file
systems can be significantly slower than ext2 but when crash recovery is
required, ext2 isn't an option. If ext2 must be used, mount it with sync
enabled. Some people recommend xfs or an ext3 filesystem mounted with
data=writeback.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From pgsql-general-owner@postgresql.org Fri Oct 4 04:00:33 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 88451476148
for <pgsql-general@postgresql.org>;
Fri, 4 Oct 2002 04:00:26 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id D1A59476082
for <pgsql-general@postgresql.org>;
Fri, 4 Oct 2002 04:00:24 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g9481rO29203
for <pgsql-general@postgresql.org>; Fri, 4 Oct 2002 13:31:53 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g9481rv29188;
Fri, 4 Oct 2002 13:31:53 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
"pankaj M. Tolani" <pankaj@pspl.co.in>
Date: Fri, 04 Oct 2002 13:30:54 +0530
MIME-Version: 1.0
Subject: Re: [HACKERS] Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3D9D980E.30447.102C03@localhost>
In-reply-to: <latopug1vl51769nkn3rj2ltdhjvqrbfof@4ax.com>
References: <3D9CBAD7.23509.A908C61@localhost>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/173
X-Sequence-Number: 31172
On 3 Oct 2002 at 18:53, Manfred Koizar wrote:
> On Thu, 03 Oct 2002 21:47:03 +0530, "Shridhar Daithankar"
> <shridhar_daithankar@persistent.co.in> wrote:
> >I believe that was vacuum analyze only.
>
> Well there is
>
> VACUUM [tablename];
>
> and there is
>
> ANALYZE [tablename];
>
> And
>
> VACUUM ANALYZE [tablename];
>
> is VACUUM followed by ANALYZE.
I was using vacuum analyze.
Good that you pointed out. Now I will modify the postgresql auto vacuum daemon
that I wrote to analyze only in case of excesive inserts. I hope that's lighter
on performance compared to vacuum analyze..
Bye
Shridhar
--
Mix's Law: There is nothing more permanent than a temporary building. There is
nothing more permanent than a temporary tax.
From pgsql-performance-owner@postgresql.org Fri Oct 4 12:04:21 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 924624773CF
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 11:58:00 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 9887F477259
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 11:56:41 -0400 (EDT)
Received: from [63.195.55.98] (account <josh@agliodbs.com>)
by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9)
with HTTP id 1771475; Fri, 04 Oct 2002 08:54:56 -0700
From: "Josh Berkus" <josh@agliodbs.com>
Subject: Re: Comparitive UPDATE speed
To: Ron Johnson <ron.l.johnson@cox.net>
Cc: pgsql-performance@postgresql.org
X-Mailer: CommuniGate Pro Web Mailer v.3.5.9
Date: Fri, 04 Oct 2002 08:54:56 -0700
Message-ID: <web-1771475@davinci.ethosmedia.com>
In-Reply-To: <1033708425.28946.203.camel@haggis>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/19
X-Sequence-Number: 36
Folks,
Sorry for the double-quoting here. I sent this to just Ron by
accident. My original question is double-quoted, Ron is quoted, and my
responses are below. Thanks!
> > Ok, I'm still confused.
> >
> > I'm updating a (not not indexed) field in a 117,000 row table based
> on
> > information in another 117,000 row table. The update is an
> integer, and the
> > linking fields are indexed. Yet the two queries are flattening my
>
> > dual-processor, RAID5 database server for up to 11 minutes ...
> using 230mb
> > ram the entire time. I simply can't believe that these two
> queries are that
> > difficult.
>
> So there's no index on elbs_matter_links.case_id? From your original
>
> post, I thought that there *is* an index on that field.
I'm now dropping it before the update. Unfortunately, dropping the
index made no appreciable gain in performance.
> > I've increased the memory available to the update to 256mb, and
> tried forcing
> > an index scan ... to no avail. Ideas, please?
> >
> > The queries:
> >
> > UPDATE elbs_matter_links SET case_id = case_clients.case_id
> > FROM case_clients
> > WHERE elbs_matter_links.mmatter = case_clients.matter_no;
>
> What happens if you run the query:
> SELECT eml.case_id, cc.case_id, eml.mmatter, cc.matter_no
> FROM elbs_matter_links eml,
> case_clients cc
> WHERE eml.mmatter = cc.matter_no;
>
> That, for all intents and purposes, is your UPDATE statement, just
> without doing the UPDATE. How fast does it run?
Slowly. It takes about 60 seconds to return data. This may be the
problem. Thoughts? Here's EXPLAIN output:
Hash Join (cost=3076.10..91842.88 rows=108648 width=40)
-> Seq Scan on elbs_matter_links eml (cost=0.00..85641.87
rows=117787 width=20)
-> Hash (cost=2804.48..2804.48 rows=108648 width=20)
-> Seq Scan on case_clients cc (cost=0.00..2804.48
rows=108648 width=20)
According to the parser, using the indexes would be worse:
Merge Join (cost=0.00..520624.38 rows=108648 width=40)
-> Index Scan using idx_eml_mmatter on elbs_matter_links eml
(cost=0.00..451735.00 rows=117787 width=20)
-> Index Scan using idx_caseclients_matter on case_clients cc
(cost=0.00..66965.20 rows=108648 width=20)
Though in practice, a forced index scan returns rows in about 60
seconds, same as the SeqScan version.
All of this seems very costly for a query that, while it does return a
lot of rows, is essentially a very simple query.
More importantly, on the hardware I'm using, I would expect better
performance that I get on my laptop ... and I'm not seeing it. I just
can't believe that the simple query above could soak 200mb of RAM for a
full 60 seconds to return a result. It's like queries over a certain
result size on the system choke postgres.
My reference data below:
==============================================
>
> > UPDATE elbs_matter_links SET case_id = cases.case_id
> > FROM cases
> > WHERE elbs_matter_links.docket = cases.docket
> > AND elbs_matter_links.case_id IS NULL;
> >
> >
> > EXPLAIN output:
> >
> > Hash Join (cost=4204.83..39106.77 rows=8473 width=299)
> > -> Index Scan using idx_eml_mmatter on elbs_matter_links
> > (cost=0.00..34668.94 rows=8473 width=279)
> > -> Hash (cost=2808.38..2808.38 rows=109038 width=20)
> > -> Seq Scan on case_clients (cost=0.00..2808.38
> rows=109038
> > width=20)
> >
> > Nested Loop (cost=0.00..32338.47 rows=99 width=300)
> > -> Seq Scan on cases (cost=0.00..9461.97 rows=4297 width=21)
> > -> Index Scan using idx_eml_docket on elbs_matter_links
> (cost=0.00..5.31
> > rows=1 width=279)
> >
> > Table defintions:
> >
> > Table "elbs_matter_links"
> > Column | Type | Modifiers
> > ------------------+-----------------------+-----------------------
> > mmatter | character varying(15) | not null
> > case_id | integer |
> > matter_check | character varying(20) | not null default 'OK'
> > docket | character varying(50) |
> > case_name | character varying(50) |
> > practice | character varying(50) |
> > opp_counsel_name | character varying(50) |
> > opp_counsel_id | integer |
> > act_type | character varying(10) |
> > lead_case_id | integer |
> > lead_case_docket | character varying(50) |
> > disease | character varying(50) |
> > docket_no | character varying(25) |
> > juris_state | character varying(6) |
> > juris_local | character varying(20) |
> > status | smallint | not null default 1
> > client_id | integer |
> > office_loc | character varying(5) |
> > date_filed | date |
> > date_served | date |
> > date_resolved | date |
> > case_status | character varying(5) |
> > settle_amount | numeric(12,2) | default 0
> > narrative | text |
> > comment | character varying(50) |
> > client_no | character varying(10) |
> > juris_id | integer |
> > Indexes: idx_eml_check,
> > idx_eml_docket,
> > idx_eml_mmatter
> > Primary key: elbs_matter_links_pkey
> >
> > Table "case_clients"
> > Column | Type |
> Modifiers
> >
>
------------------+-----------------------+----------------------------------------------------
> > case_client_id | integer | not null default
> > nextval('case_clients_seq'::text)
> > case_id | integer | not null
> > client_id | integer | not null
> > office_loc | character varying(5) |
> > date_filed | date |
> > date_served | date |
> > date_resolved | date |
> > matter_no | character varying(15) | not null
> > case_status | character varying(5) | not null
> > settle_amount | numeric(14,2) | not null default 0
> > matter_narrative | text |
> > comment | character varying(50) |
> > Indexes: idx_case_clients_client,
> > idx_caseclients_case,
> > idx_caseclients_matter,
> > idx_caseclients_resolved,
> > idx_caseclients_served,
> > idx_caseclients_status
> > Primary key: case_clients_pkey
> >
> >
> > Table "cases"
> > Column | Type |
> Modifiers
> >
>
------------------+-----------------------+---------------------------------------------
> > case_id | integer | not null default
> > nextval('cases_seq'::text)
> > docket | character varying(50) | not null
> > case_name | character varying(50) | not null
> > practice | character varying(50) | not null
> > opp_counsel_name | character varying(50) |
> > opp_counsel_id | integer |
> > act_type | character varying(10) |
> > lead_case_id | integer |
> > lead_case_docket | character varying(50) |
> > disease | character varying(50) |
> > docket_no | character varying(25) | not null
> > juris_state | character varying(6) | not null
> > juris_local | character varying(20) |
> > tgroup_id | integer |
> > status | smallint | not null default 1
> > juris_id | integer |
> > Indexes: idx_case_cases_juris,
> > idx_cases_docket,
> > idx_cases_lead,
> > idx_cases_name,
> > idx_cases_status,
> > idx_cases_tgroup,
> > idx_lower_case_name
> >
> >
> >
> > --
> > Josh Berkus
> > josh@agliodbs.com
> > Aglio Database Solutions
> > San Francisco
> --
> +------------------------------------------------------------+
> | Ron Johnson, Jr. mailto:ron.l.johnson@cox.net |
> | Jefferson, LA USA http://members.cox.net/ron.l.johnson |
> | |
> | "What other evidence do you have that they are terrorists, |
> | other than that they trained in these camps?" |
> | 17-Sep-2002 Katie Couric to an FBI agent regarding the 5 |
> | men arrested near Buffalo NY |
> +------------------------------------------------------------+
>
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
From pgsql-general-owner@postgresql.org Fri Oct 4 12:17:40 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 38FDD47590C; Fri, 4 Oct 2002 12:15:54 -0400 (EDT)
Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222])
by postgresql.org (Postfix) with ESMTP
id B3CA34771AE; Fri, 4 Oct 2002 12:13:54 -0400 (EDT)
Received: from css120.ihs.com (css120.ihs.com [170.207.105.120])
by mail1.ihs.com (8.12.6/8.12.6) with ESMTP id g94GD0S5008804;
Fri, 4 Oct 2002 10:13:00 -0600 (MDT)
Date: Fri, 4 Oct 2002 10:05:10 -0600 (MDT)
From: "scott.marlowe" <scott.marlowe@ihs.com>
To: <hs@cybertec.at>
Cc: <shridhar_daithankar@persistent.co.in>,
<pgsql-performance@postgresql.org>, <pgsql-general@postgresql.org>
Subject: Re: [HACKERS] Large databases, performance
In-Reply-To: <3D9C7579.2010206@cybertec.at>
Message-ID: <Pine.LNX.4.33.0210040958440.9386-100000@css120.ihs.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
X-MailBodyFilter: Message body has not been filtered
X-MailScanner: Found to be clean
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/258
X-Sequence-Number: 31256
On Thu, 3 Oct 2002, Hans-J�rgen Sch�nig wrote:
> In the case of concurrent transactions MySQL does not do as well due to
> very bad locking behavious. PostgreSQL is far better because it does row
> level locking instead of table locking.
> If you have many concurrent transactions MySQL performs some sort of
> "self-denial-of-service". I'd choose PostgreSQL in order to make sure
> that the database does not block.
While I'm no big fan of MySQL, I must point out that with innodb tables,
the locking is row level, and the ability to handle parallel read / write
is much improved.
Also, Postgresql does NOT use row level locking, it uses MVCC, which is
"better than row level locking" as Tom puts it.
Of course, hot backup is only 2,000 Euros for an innodb table mysql, while
hot backup for postgresql is free. :-)
That said, MySQL still doesn't handle parallel load nearly as well as
postgresql, it's just better than it once was.
> Also: Keep in mind that PostgreSQL has a wonderful core team. MySQL is
> built on Monty Widenius and the core team = Monty.
> Also: PostgreSQL = ANSI compilant, MySQL = Monty compliant
This is a very valid point. The "committee" that creates and steers
Postgresql is very much a meritocracy. The "committee" that steers MySQL
is Monty.
I'm much happier knowing that every time something important needs to be
done we have a whole cupboard full of curmudgeons arguing the fine points
so that the "right thing" gets done.
From pgsql-general-owner@postgresql.org Mon Oct 7 08:37:33 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 538C347705B
for <pgsql-general@postgresql.org>;
Fri, 4 Oct 2002 12:25:17 -0400 (EDT)
Received: from bachata.cybertec.at (unknown [62.116.21.146])
by postgresql.org (Postfix) with SMTP id 4A073476920
for <pgsql-general@postgresql.org>;
Fri, 4 Oct 2002 12:24:58 -0400 (EDT)
Received: (qmail 15316 invoked from network); 4 Oct 2002 16:24:51 -0000
Received: from unknown (HELO cybertec.at) (62.116.21.147)
by 62.116.21.146 with SMTP; 4 Oct 2002 16:24:51 -0000
Message-ID: <3D9DC237.8060802@cybertec.at>
Date: Fri, 04 Oct 2002 18:30:47 +0200
From: =?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <hs@cybertec.at>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: "scott.marlowe" <scott.marlowe@ihs.com>,
pgsql-general@postgresql.org
Subject: Re: [HACKERS] Large databases, performance
References: <Pine.LNX.4.33.0210040958440.9386-100000@css120.ihs.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/363
X-Sequence-Number: 31361
MVCC = great ...
I know that is not row level locking but that's the way things can be
explained more easily. Many people are asking my how things work and
this way it is easier to understand. Never tell a trainee about deadlock
detection and co *g*.
I am happy that the PostgreSQL core team + all developers are not like
Monty ...
I am happy to PostgreSQL has developers such as Bruce, Tom, Jan, Marc,
Vadim, Joe, Neil, Christopher, etc. (just to name a few) ...
Yes, it is said to be better than it was but that's not the point:
MySQL = Monty SQL <> ANSI SQL ...
Believe me, the table will turn and finally the better system will succeed.
One we have clustering, PITR, etc. running people will see how real
databases work :).
Hans
scott.marlowe wrote:
>On Thu, 3 Oct 2002, Hans-J�rgen Sch�nig wrote:
>
>
>
>>In the case of concurrent transactions MySQL does not do as well due to
>>very bad locking behavious. PostgreSQL is far better because it does row
>>level locking instead of table locking.
>>If you have many concurrent transactions MySQL performs some sort of
>>"self-denial-of-service". I'd choose PostgreSQL in order to make sure
>>that the database does not block.
>>
>>
>
>While I'm no big fan of MySQL, I must point out that with innodb tables,
>the locking is row level, and the ability to handle parallel read / write
>is much improved.
>
>Also, Postgresql does NOT use row level locking, it uses MVCC, which is
>"better than row level locking" as Tom puts it.
>
>Of course, hot backup is only 2,000 Euros for an innodb table mysql, while
>hot backup for postgresql is free. :-)
>
>That said, MySQL still doesn't handle parallel load nearly as well as
>postgresql, it's just better than it once was.
>
>
>
>>Also: Keep in mind that PostgreSQL has a wonderful core team. MySQL is
>>built on Monty Widenius and the core team = Monty.
>>Also: PostgreSQL = ANSI compilant, MySQL = Monty compliant
>>
>>
>
>This is a very valid point. The "committee" that creates and steers
>Postgresql is very much a meritocracy. The "committee" that steers MySQL
>is Monty.
>
>I'm much happier knowing that every time something important needs to be
>done we have a whole cupboard full of curmudgeons arguing the fine points
>so that the "right thing" gets done.
>
>
--
*Cybertec Geschwinde u Schoenig*
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/1/913 68 09; +43/664/233 90 75
www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at
<http://cluster.postgresql.at>, www.cybertec.at
<http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at>
From pgsql-performance-owner@postgresql.org Fri Oct 4 12:36:02 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 6CE56476920
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 12:36:01 -0400 (EDT)
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
by postgresql.org (Postfix) with SMTP id 328704768CD
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 12:36:00 -0400 (EDT)
Received: (qmail 18434 invoked by uid 0); 4 Oct 2002 16:36:05 -0000
Received: from chello062178186201.1.15.tuwien.teleweb.at (HELO beeblebrox)
(62.178.186.201)
by mail.gmx.net (mp016-rz3) with SMTP; 4 Oct 2002 16:36:05 -0000
Message-ID: <01c601c26bc4$73d5f900$4201a8c0@beeblebrox>
From: "Michael Paesold" <mpaesold@gmx.at>
To: <pgsql-performance@postgresql.org>
References: <3D9C8712.9513.9C6521D@localhost>
<3D9CBAD7.23509.A908C61@localhost> <3D9C7579.2010206@cybertec.at>
<20021003170920.X18497@mail.libertyrms.com>
Subject: Re: Large databases, performance
Date: Fri, 4 Oct 2002 18:38:21 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/21
X-Sequence-Number: 38
Andrew Sullivan <andrew@libertyrms.info> wrote:
> On Thu, Oct 03, 2002 at 06:51:05PM +0200, Hans-J?rgen Sch?nig wrote:
>
> > In the case of concurrent transactions MySQL does not do as well due to
> > very bad locking behavious. PostgreSQL is far better because it does row
> > level locking instead of table locking.
>
> It is my understanding that MySQL no longer does this on InnoDB
> tables. Whether various bag-on-the-side table types are a good thing
> I will leave to others; but there's no reason to go 'round making
> claims about old versions of MySQL any more than there is a reason to
> continue to talk about PostgreSQL not being crash safe. MySQL has
> moved along nearly as quickly as PostgreSQL.
Locking and transactions is not fine in MySQL (with InnoDB) though. I tried
to do selects on a table I was concurrently inserting to. In a single thread
I was constantly inserting 1000 rows per transaction. While inserting I did
some random selects on the same table. It often happend that the insert
transactions were aborted due to dead lock problems. There I see the problem
with locking reads.
I like PostgreSQL's MVCC!
Regards,
Michael Paesold
From pgsql-performance-owner@postgresql.org Fri Oct 4 12:44:01 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id AC7E547635A
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 12:44:00 -0400 (EDT)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id 237B6476237
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 12:43:59 -0400 (EDT)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 17xVYZ-0003cy-00
for <pgsql-performance@postgresql.org>; Fri, 04 Oct 2002 12:44:03 -0400
Date: Fri, 4 Oct 2002 12:44:03 -0400
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Comparitive UPDATE speed
Message-ID: <20021004124403.I949@mail.libertyrms.com>
Mail-Followup-To: pgsql-performance@postgresql.org
References: <1033708425.28946.203.camel@haggis>
<web-1771475@davinci.ethosmedia.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <web-1771475@davinci.ethosmedia.com>;
from josh@agliodbs.com on Fri, Oct 04, 2002 at 08:54:56AM -0700
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/22
X-Sequence-Number: 39
On Fri, Oct 04, 2002 at 08:54:56AM -0700, Josh Berkus wrote:
> Slowly. It takes about 60 seconds to return data. This may be the
> problem. Thoughts? Here's EXPLAIN output:
[. . .]
> According to the parser, using the indexes would be worse:
Have you run this with EXPLAIN ANALYSE? It will actually perform the
necessary steps, so it will reveal if the planner is getting
something wrong.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-general-owner@postgresql.org Fri Oct 4 12:47:40 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 219A5476C36
for <pgsql-general@postgresql.org>;
Fri, 4 Oct 2002 12:47:39 -0400 (EDT)
Received: from scanmail4.cableone.net (scanmail4.cableone.net [24.116.0.124])
by postgresql.org (Postfix) with ESMTP id 14C33476B49
for <pgsql-general@postgresql.org>;
Fri, 4 Oct 2002 12:47:38 -0400 (EDT)
Received: from scanmail4.cableone.net ([10.116.0.124]) by
scanmail4.cableone.net with Microsoft SMTPSVC(5.5.1877.687.68);
Fri, 4 Oct 2002 09:46:44 -0700
Received: from scanmail4.cableone.net [24.116.0.124] by scanmail4.cableone.net
(SMTPD32-7.04) id A5D390246; Fri, 04 Oct 2002 09:46:14 -0700
Received: from redwood ( [24.117.24.47]) by mail.cableone.net with SMTP
(MailShield v2.04 - WIN32 Jul 17 2001 17:12:42);
Fri, 04 Oct 2002 09:46:13 -0600
From: "David Blood" <david@matraex.com>
To: <pgsql-general@postgresql.org>
Subject: Pinning a table into memory
Date: Fri, 4 Oct 2002 10:46:57 -0600
Message-ID: <03a301c26bc5$a799a970$1f00a8c0@redwood>
MIME-Version: 1.0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.2616
In-Reply-To: <01c601c26bc4$73d5f900$4201a8c0@beeblebrox>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-SMTP-HELO: redwood
X-SMTP-MAIL-FROM: david@matraex.com
X-SMTP-PEER-INFO: [24.117.24.47]
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/263
X-Sequence-Number: 31261
In Oracle you can Pin large objects into memory to prevent frequent
reloads. Is there anyway to do this with Postgres? It appears that some
of our tables that get hit a lot may get kicked out of memory when we
access some of our huge tables. Then they have to wait for I/O to get
loaded back in.
David Blood
Matraex, Inc
From pgsql-performance-owner@postgresql.org Fri Oct 4 14:14:35 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 5CDC647627D
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 14:14:33 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 8C29147620C
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 14:14:32 -0400 (EDT)
Received: from [216.135.165.74] (HELO lazarus)
by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP-TLS id 1771672; Fri, 04 Oct 2002 11:12:28 -0700
Content-Type: text/plain;
charset="iso-8859-1"
From: Josh Berkus <josh@agliodbs.com>
Organization: Aglio Database Solutions
To: Andrew Sullivan <andrew@libertyrms.info>, pgsql-performance@postgresql.org
Subject: Re: Comparitive UPDATE speed
Date: Fri, 4 Oct 2002 11:13:09 -0700
X-Mailer: KMail [version 1.4]
References: <1033708425.28946.203.camel@haggis>
<web-1771475@davinci.ethosmedia.com>
<20021004124403.I949@mail.libertyrms.com>
In-Reply-To: <20021004124403.I949@mail.libertyrms.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210041113.10008.josh@agliodbs.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/23
X-Sequence-Number: 40
Andrew,
> Have you run this with EXPLAIN ANALYSE? It will actually perform the
> necessary steps, so it will reveal if the planner is getting
> something wrong.
Here it is:
Hash Join (cost=3D3076.10..91842.88 rows=3D108648 width=3D40) (actual=20
time=3D18625.19..22823.39 rows=3D108546 loops=3D1)
-> Seq Scan on elbs_matter_links eml (cost=3D0.00..85641.87 rows=3D1177=
87=20
width=3D20) (actual time=3D18007.69..19515.63 rows=3D117787 loops=3D1)
-> Hash (cost=3D2804.48..2804.48 rows=3D108648 width=3D20) (actual=20
time=3D602.12..602.12 rows=3D0 loops=3D1)
-> Seq Scan on case_clients cc (cost=3D0.00..2804.48 rows=3D10864=
8=20
width=3D20) (actual time=3D5.18..370.68 rows=3D108648 loops=3D1)
Total runtime: 22879.26 msec
The above doesn't seem bad, except that this is some serious hardware in th=
is=20
system and 23 seconds right after VACUUM ANALYZE is too long. I've a feeli=
ng=20
that I botched one of my postgresql.conf parameters or something.
I'll do an explain for the UPDATE query later, when the users are off the=
=20
system.
-Josh Berkus
--=20
Josh Berkus
josh@agliodbs.com
Aglio Database Solutions
San Francisco
From pgsql-performance-owner@postgresql.org Fri Oct 4 14:25:29 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id F25084766A2
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 14:25:27 -0400 (EDT)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id 1CD304762E0
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 14:25:24 -0400 (EDT)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 17xX8d-0005Wv-00
for <pgsql-performance@postgresql.org>; Fri, 04 Oct 2002 14:25:23 -0400
Date: Fri, 4 Oct 2002 14:25:23 -0400
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Comparitive UPDATE speed
Message-ID: <20021004142523.M949@mail.libertyrms.com>
Mail-Followup-To: pgsql-performance@postgresql.org
References: <1033708425.28946.203.camel@haggis>
<web-1771475@davinci.ethosmedia.com>
<20021004124403.I949@mail.libertyrms.com>
<200210041113.10008.josh@agliodbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <200210041113.10008.josh@agliodbs.com>;
from josh@agliodbs.com on Fri, Oct 04, 2002 at 11:13:09AM -0700
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/24
X-Sequence-Number: 41
On Fri, Oct 04, 2002 at 11:13:09AM -0700, Josh Berkus wrote:
>
> Andrew,
>
> > Have you run this with EXPLAIN ANALYSE? It will actually perform the
> > necessary steps, so it will reveal if the planner is getting
> > something wrong.
>
> Here it is:
Oops, sorry. What if you force the index use here? Just because the
planner thinks that's more expensive doesn't mean that it is.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-general-owner@postgresql.org Fri Oct 4 14:47:50 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id D51644762E0
for <pgsql-general@postgresql.org>;
Fri, 4 Oct 2002 14:47:49 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id 1D4394762E2
for <pgsql-general@postgresql.org>;
Fri, 4 Oct 2002 14:47:49 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g94IllhR025546;
Fri, 4 Oct 2002 14:47:48 -0400 (EDT)
To: "David Blood" <david@matraex.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Pinning a table into memory
In-reply-to: <03a301c26bc5$a799a970$1f00a8c0@redwood>
References: <03a301c26bc5$a799a970$1f00a8c0@redwood>
Comments: In-reply-to "David Blood" <david@matraex.com>
message dated "Fri, 04 Oct 2002 10:46:57 -0600"
Date: Fri, 04 Oct 2002 14:47:47 -0400
Message-ID: <25545.1033757267@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/274
X-Sequence-Number: 31272
"David Blood" <david@matraex.com> writes:
> In Oracle you can Pin large objects into memory to prevent frequent
> reloads. Is there anyway to do this with Postgres?
I can never understand why people think this would be a good idea.
If you're hitting a table frequently, it will stay in memory anyway
(either in Postgres shared buffers or kernel disk cache). If you're
not hitting it frequently enough to keep it swapped in, then whatever
is getting swapped in instead is probably a better candidate to be
occupying the space. ISTM that a manual "pin this table" knob would
mostly have the effect of making performance worse, whenever the
system activity is slightly different from the situation you had in
mind when you installed the pin.
Having said that, I'll freely concede that our cache management
algorithms could use improvement (and there are people looking at
that right now). But a manual pin doesn't seem like a better answer.
regards, tom lane
From pgsql-performance-owner@postgresql.org Fri Oct 4 15:10:49 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 4835B47610A
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 15:10:48 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id A5D4B4760DB
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 15:10:47 -0400 (EDT)
Received: from [216.135.165.74] (HELO lazarus)
by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP-TLS id 1771773; Fri, 04 Oct 2002 12:09:01 -0700
Content-Type: text/plain;
charset="iso-8859-1"
From: Josh Berkus <josh@agliodbs.com>
Organization: Aglio Database Solutions
To: Andrew Sullivan <andrew@libertyrms.info>, pgsql-performance@postgresql.org
Subject: Re: Comparitive UPDATE speed
Date: Fri, 4 Oct 2002 12:09:42 -0700
X-Mailer: KMail [version 1.4]
References: <1033708425.28946.203.camel@haggis>
<200210041113.10008.josh@agliodbs.com>
<20021004142523.M949@mail.libertyrms.com>
In-Reply-To: <20021004142523.M949@mail.libertyrms.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210041209.42665.josh@agliodbs.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/25
X-Sequence-Number: 42
Andrew,
> Oops, sorry. What if you force the index use here? Just because the
> planner thinks that's more expensive doesn't mean that it is.
Yeah, I tried it ... no faster, no slower, really.
BTW, in case you missed it, the real concern is that an UPDATE query simila=
r=20
to the SELECT query we are discussing takes over 10 minutes, which on this=
=20
hardware is ridiculous. Robert suggested that we test the SELECT query to=
=20
see if there were general performance problems; apparently, there are.
The hardware I'm using is:
dual-processor Athalon 1400mhz motherboard
raid 5 UW SCSI drive array with 3 drives
512mb DDR RAM
SuSE Linux 7.3 (Kernel 2.4.10)
Postgres is on its own LVM partition
PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.95.3
(will upgrade to 7.2.3 very soon)
Postgresql.conf has: fdatasync, various chared memory tuned to allocate 256=
mb=20
to postgres (which seems to be working correctly).
Debug level 2.
When the UPDATE query takes a long time, I generally can watch the log hove=
r=20
in the land of "Reaping dead child processes" for 30-90 seconds per=20
iteration.
--=20
Josh Berkus
josh@agliodbs.com
Aglio Database Solutions
San Francisco
From pgsql-performance-owner@postgresql.org Fri Oct 4 15:24:16 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 90A1D475BA1
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 15:24:15 -0400 (EDT)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id D62FC47580B
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 15:24:14 -0400 (EDT)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 17xY3b-0006bh-00
for <pgsql-performance@postgresql.org>; Fri, 04 Oct 2002 15:24:15 -0400
Date: Fri, 4 Oct 2002 15:24:15 -0400
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Comparitive UPDATE speed
Message-ID: <20021004152415.T949@mail.libertyrms.com>
Mail-Followup-To: pgsql-performance@postgresql.org
References: <1033708425.28946.203.camel@haggis>
<200210041113.10008.josh@agliodbs.com>
<20021004142523.M949@mail.libertyrms.com>
<200210041209.42665.josh@agliodbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <200210041209.42665.josh@agliodbs.com>;
from josh@agliodbs.com on Fri, Oct 04, 2002 at 12:09:42PM -0700
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/26
X-Sequence-Number: 43
On Fri, Oct 04, 2002 at 12:09:42PM -0700, Josh Berkus wrote:
> BTW, in case you missed it, the real concern is that an UPDATE query similar
> to the SELECT query we are discussing takes over 10 minutes, which on this
> hardware is ridiculous. Robert suggested that we test the SELECT query to
> see if there were general performance problems; apparently, there are.
Yes, that's my thought, too.
> Postgresql.conf has: fdatasync, various chared memory tuned to allocate 256mb
> to postgres (which seems to be working correctly).
Hmm. Are you swapping? Lots of temp files? (I presume you've been
over all that.) Half your physical memory seems pretty dangerous to
me. If oyu reduce that, does it help?
> When the UPDATE query takes a long time, I generally can watch the log hover
> in the land of "Reaping dead child processes" for 30-90 seconds per
> iteration.
Ick. Hmm. What sort of numbers do you get from vmstat, iostat, sar,
and friends?
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-performance-owner@postgresql.org Fri Oct 4 15:41:17 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id AB43E476094
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 15:41:15 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id 11B5E475EE2
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 15:41:15 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g94JfEhR026114;
Fri, 4 Oct 2002 15:41:14 -0400 (EDT)
To: Josh Berkus <josh@agliodbs.com>
Cc: Andrew Sullivan <andrew@libertyrms.info>, pgsql-performance@postgresql.org
Subject: Re: Comparitive UPDATE speed
In-reply-to: <200210041113.10008.josh@agliodbs.com>
References: <1033708425.28946.203.camel@haggis>
<web-1771475@davinci.ethosmedia.com>
<20021004124403.I949@mail.libertyrms.com>
<200210041113.10008.josh@agliodbs.com>
Comments: In-reply-to Josh Berkus <josh@agliodbs.com>
message dated "Fri, 04 Oct 2002 11:13:09 -0700"
Date: Fri, 04 Oct 2002 15:41:14 -0400
Message-ID: <26113.1033760474@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/27
X-Sequence-Number: 44
Josh Berkus <josh@agliodbs.com> writes:
> Hash Join (cost=3076.10..91842.88 rows=108648 width=40) (actual
> time=18625.19..22823.39 rows=108546 loops=1)
> -> Seq Scan on elbs_matter_links eml (cost=0.00..85641.87 rows=117787
> width=20) (actual time=18007.69..19515.63 rows=117787 loops=1)
> -> Hash (cost=2804.48..2804.48 rows=108648 width=20) (actual
> time=602.12..602.12 rows=0 loops=1)
> -> Seq Scan on case_clients cc (cost=0.00..2804.48 rows=108648
> width=20) (actual time=5.18..370.68 rows=108648 loops=1)
> Total runtime: 22879.26 msec
Hm. Why does it take 19500 milliseconds to read 117787 rows from
elbs_matter_links, if 108648 rows can be read from case_clients in 370
msec? And why does the output show that the very first of those rows
was returned only after 18000 msec?
I am suspicious that this table has a huge number of empty pages in it,
mostly at the beginning. If so, a VACUUM FULL would help. (Try
"vacuum full verbose elbs_matter_links" and see if it indicates it's
reclaiming any large number of pages.)
If that proves to be the answer, you need to look to your FSM
parameters, and perhaps arrange for more frequent regular vacuums
of this table.
regards, tom lane
From pgsql-performance-owner@postgresql.org Fri Oct 4 15:45:35 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id A87F1476D3E
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 15:45:34 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id D4F64476BFA
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 15:45:32 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g94JjShR026160;
Fri, 4 Oct 2002 15:45:28 -0400 (EDT)
To: Josh Berkus <josh@agliodbs.com>
Cc: Andrew Sullivan <andrew@libertyrms.info>, pgsql-performance@postgresql.org
Subject: Re: Comparitive UPDATE speed
In-reply-to: <200210041209.42665.josh@agliodbs.com>
References: <1033708425.28946.203.camel@haggis>
<200210041113.10008.josh@agliodbs.com>
<20021004142523.M949@mail.libertyrms.com>
<200210041209.42665.josh@agliodbs.com>
Comments: In-reply-to Josh Berkus <josh@agliodbs.com>
message dated "Fri, 04 Oct 2002 12:09:42 -0700"
Date: Fri, 04 Oct 2002 15:45:28 -0400
Message-ID: <26159.1033760728@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/28
X-Sequence-Number: 45
Josh Berkus <josh@agliodbs.com> writes:
> When the UPDATE query takes a long time, I generally can watch the log hover
> in the land of "Reaping dead child processes" for 30-90 seconds per
> iteration.
Uh ... would you translate that observation into English please? Or
better, provide the log output you're looking at?
regards, tom lane
From pgsql-performance-owner@postgresql.org Fri Oct 4 17:02:12 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 022CF47610A
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 17:02:12 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 66A6C4760B0
for <pgsql-performance@postgresql.org>;
Fri, 4 Oct 2002 17:02:11 -0400 (EDT)
Received: from [216.135.165.74] (HELO lazarus)
by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP-TLS id 1771959; Fri, 04 Oct 2002 14:00:27 -0700
Content-Type: text/plain;
charset="iso-8859-1"
From: Josh Berkus <josh@agliodbs.com>
Organization: Aglio Database Solutions
To: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Comparitive UPDATE speed
Date: Fri, 4 Oct 2002 14:01:07 -0700
X-Mailer: KMail [version 1.4]
Cc: Andrew Sullivan <andrew@libertyrms.info>, pgsql-performance@postgresql.org
References: <1033708425.28946.203.camel@haggis>
<200210041113.10008.josh@agliodbs.com>
<26113.1033760474@sss.pgh.pa.us>
In-Reply-To: <26113.1033760474@sss.pgh.pa.us>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210041401.07878.josh@agliodbs.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/29
X-Sequence-Number: 46
Tom,
> I am suspicious that this table has a huge number of empty pages in it,
> mostly at the beginning. If so, a VACUUM FULL would help. (Try
> "vacuum full verbose elbs_matter_links" and see if it indicates it's
> reclaiming any large number of pages.)
Thank you. Aha.
That appears to have been the main problem; apparently, at some time during=
my=20
tinkering, I dumped most of the rows from elbs_matter_links a couple of=20
times. Ooops.
I'll post the new situation when I test the update queries tonight.
--=20
Josh Berkus
josh@agliodbs.com
Aglio Database Solutions
San Francisco
From pgsql-general-owner@postgresql.org Sun Oct 6 11:52:37 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id CCE504761E9; Sun, 6 Oct 2002 11:52:35 -0400 (EDT)
Received: from platonic.cynic.net (platonic.cynic.net [204.80.150.245])
by postgresql.org (Postfix) with ESMTP
id 5ACF1475F8C; Sun, 6 Oct 2002 11:52:35 -0400 (EDT)
Received: from angelic.cynic.net (angelic-platonic.cvpn.cynic.net
[198.73.220.226]) by platonic.cynic.net (Postfix) with ESMTP
id 65E37BF4C; Sun, 6 Oct 2002 15:52:38 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by angelic.cynic.net (Postfix) with ESMTP
id 9557F8736; Mon, 7 Oct 2002 00:52:24 +0900 (JST)
Date: Mon, 7 Oct 2002 00:52:24 +0900 (JST)
From: Curt Sampson <cjs@cynic.net>
To: Neil Conway <neilc@samurai.com>
Cc: PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>,
PostgresSQL General Mailing List <pgsql-general@postgresql.org>
Subject: Re: [HACKERS] Performance while loading data and indexing
In-Reply-To: <87n0q4zc0l.fsf@mailbox.samurai.com>
Message-ID: <Pine.NEB.4.44.0210070050500.515-100000@angelic.cynic.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/324
X-Sequence-Number: 31322
On 26 Sep 2002, Neil Conway wrote:
> The fact that ext2 defaults to asynchronous mode and UFS (at least on
> the BSDs) defaults to synchronous mode seems like a total non-issue to
> me. Is there any more to the alleged difference in reliability?
It was sort of pointed out here, but perhaps not made completely
clear, that Berkley FFS defaults to synchronous meta-data updates,
but asynchronous data updates. You can also specify entirely
synchronous or entirely asynchronous updates. Linux ext2fs supports
only these last two modes, which is the problem.
cjs
--
Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC
From pgsql-general-owner@postgresql.org Sun Oct 6 22:27:05 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id D2FD7475EE1; Sun, 6 Oct 2002 22:27:03 -0400 (EDT)
Received: from platonic.cynic.net (platonic.cynic.net [204.80.150.245])
by postgresql.org (Postfix) with ESMTP
id 4E868475E45; Sun, 6 Oct 2002 22:27:03 -0400 (EDT)
Received: from angelic.cynic.net (angelic-platonic.cvpn.cynic.net
[198.73.220.226]) by platonic.cynic.net (Postfix) with ESMTP
id B13B7BF4C; Mon, 7 Oct 2002 02:27:06 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by angelic.cynic.net (Postfix) with ESMTP
id 752128736; Mon, 7 Oct 2002 11:27:04 +0900 (JST)
Date: Mon, 7 Oct 2002 11:27:04 +0900 (JST)
From: Curt Sampson <cjs@cynic.net>
Reply-To: pgsql-performance@postgresql.org,
Curt Sampson <cjs@cynic.net>
To: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
Cc: pgsql-general <pgsql-general@postgresql.org>,
<pgsql-hackers@postgresql.org>
Subject: Re: Large databases, performance
In-Reply-To: <3D9CB613.1700.A7DEEF0@localhost>
Message-ID: <Pine.NEB.4.44.0210071124410.443-100000@angelic.cynic.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/328
X-Sequence-Number: 31326
On Thu, 3 Oct 2002, Shridhar Daithankar wrote:
> Well, we were comparing ext3 v/s reiserfs. I don't remember the journalling
> mode of ext3 but we did a 10 GB write test. Besides converting the RAID to RAID-
> 0 from RAID-5 might have something to do about it.
That will have a massive, massive effect on performance. Depending on
your RAID subsystem, you can except RAID-0 to be between two and twenty
times as fast for writes as RAID-5.
If you compared one filesystem on RAID-5 and another on RAID-0,
your results are likely not at all indicative of file system
performance.
Note that I've redirected followups to the pgsql-performance list.
Avoiding cross-posting would be nice, since I am getting lots of
duplicate messages these days.
cjs
--
Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC
From pgsql-general-owner@postgresql.org Sun Oct 6 22:30:58 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 9FAE5475C98; Sun, 6 Oct 2002 22:30:56 -0400 (EDT)
Received: from platonic.cynic.net (platonic.cynic.net [204.80.150.245])
by postgresql.org (Postfix) with ESMTP
id 18880475AAC; Sun, 6 Oct 2002 22:30:56 -0400 (EDT)
Received: from angelic.cynic.net (angelic-platonic.cvpn.cynic.net
[198.73.220.226]) by platonic.cynic.net (Postfix) with ESMTP
id 9383FBF4C; Mon, 7 Oct 2002 02:30:59 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by angelic.cynic.net (Postfix) with ESMTP
id 13B958736; Mon, 7 Oct 2002 11:30:58 +0900 (JST)
Date: Mon, 7 Oct 2002 11:30:57 +0900 (JST)
From: Curt Sampson <cjs@cynic.net>
Reply-To: pgsql-performance@postgresql.org,
Curt Sampson <cjs@cynic.net>
To: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
Cc: pgsql-hackers@postgresql.org, pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Large databases, performance
In-Reply-To: <3D9CB8B3.25411.A882D21@localhost>
Message-ID: <Pine.NEB.4.44.0210071127320.443-100000@angelic.cynic.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/329
X-Sequence-Number: 31327
On Thu, 3 Oct 2002, Shridhar Daithankar wrote:
> Our major concern remains load time as data is generated in real time and is
> expecetd in database with in specified time period.
If your time period is long enough, you can do what I do, which is
to use partial indexes so that the portion of the data being loaded
is not indexed. That will speed your loads quite a lot. Aftewards
you can either generate another partial index for the range you
loaded, or generate a new index over both old and new data, and
then drop the old index.
The one trick is that the optimizer is not very smart about combining
multiple indexes, so you often need to split your queries across
the two "partitions" of the table that have separate indexes.
> Shall I subscribe to performance?
Yes, you really ought to. The list is pgsql-performance@postgresql.org.
cjs
--
Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC
From pgsql-general-owner@postgresql.org Sun Oct 6 23:20:42 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id E7122476141; Sun, 6 Oct 2002 23:20:40 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP
id 3D9E8476086; Sun, 6 Oct 2002 23:20:40 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g973KYhR015764;
Sun, 6 Oct 2002 23:20:34 -0400 (EDT)
To: Curt Sampson <cjs@cynic.net>
Cc: pgsql-general <pgsql-general@postgresql.org>, pgsql-hackers@postgresql.org
Subject: cross-posts (was Re: Large databases, performance)
In-reply-to: <Pine.NEB.4.44.0210071124410.443-100000@angelic.cynic.net>
References: <Pine.NEB.4.44.0210071124410.443-100000@angelic.cynic.net>
Comments: In-reply-to Curt Sampson <cjs@cynic.net>
message dated "Mon, 07 Oct 2002 11:27:04 +0900"
Date: Sun, 06 Oct 2002 23:20:33 -0400
Message-ID: <15763.1033960833@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/330
X-Sequence-Number: 31328
Curt Sampson <cjs@cynic.net> writes:
> ... Avoiding cross-posting would be nice, since I am getting lots of
> duplicate messages these days.
Cross-posting is a fact of life, and in fact encouraged, on the pg
lists. I suggest adapting. Try sending
set all unique your-email-address
to the PG majordomo server; this sets you up to get only one copy
of each cross-posted message.
regards, tom lane
From pgsql-general-owner@postgresql.org Mon Oct 7 05:37:06 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 1C806476360
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 05:37:04 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id 92204476227
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 05:36:58 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g979cWr08521
for <pgsql-general@postgresql.org>; Mon, 7 Oct 2002 15:08:32 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g979cWv08510;
Mon, 7 Oct 2002 15:08:32 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-hackers@postgresql.org, pgsql-general <pgsql-general@postgresql.org>
Date: Mon, 07 Oct 2002 15:07:29 +0530
MIME-Version: 1.0
Subject: Re: Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Cc: pgsql-performance@postgresql.org
Message-ID: <3DA1A331.21316.F7E742B@localhost>
In-reply-to: <3D9C3E05.7070906@clearmetrix.com>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/337
X-Sequence-Number: 31335
On 3 Oct 2002 at 8:54, Charles H. Woloszynski wrote:
> I'd be curious what happens when you submit more queries than you have
> processors (you had four concurrent queries and four CPUs), if you care
> to run any additional tests. Also, I'd report the query time in
> absolute (like you did) and also in 'Time/number of concurrent queries".
> This will give you a sense of how the system is scaling as the workload
> increases. Personally I am more concerned about this aspect than the
> load time, since I am going to guess that this is where all the time is
> spent.
OK. I am back from my cave after some more tests are done. Here are the
results. I am not repeating large part of it but answering your questions..
Don't ask me how these numbers changed. I am not the person who conducts the
test neither I have access to the system. Rest(or most ) of the things remains
same..
MySQL 3.23.52 with innodb transaction support:
4 concurrent queries :- 257.36 ms
40 concurrent queries :- 35.12 ms
Postgresql 7.2.2
4 concurrent queries :- 257.43 ms
40 concurrent queries :- 41.16 ms
Though I can not report oracle numbers, suffice to say that they fall in
between these two numbers.
Oracle seems to be hell lot faster than mysql/postgresql to load raw data even
when it's installed on reiserfs. We plan to run XFS tests later in hope that
that would improve mysql/postgresql load times.
In this run postgresql has better load time than mysql/innodb ( 18270 sec v/s
17031 sec.) Index creation times are faster as well (100 sec v/s 130 sec).
Don't know what parameters are changed.
Only worry is database size. Postgresql is 111GB v/s 87 GB for mysql. All
numbers include indexes. This is really going to be a problem when things are
deployed. Any idea how can it be taken down?
WAL is out, it's not counted.
Schema optimisation is later issue. Right now all three databases are using
same schema..
Will it help in this situation if I recompile posgresql with block size say 32K
rather than 8K default? Will it saev some overhead and offer better performance
in data load etc?
Will keep you guys updated..
Regards,
Shridhar
-----------------------------------------------------------
Shridhar Daithankar
LIMS CPE Team Member, PSPL.
mailto:shridhar_daithankar@persistent.co.in
Phone:- +91-20-5678900 Extn.270
Fax :- +91-20-5678901
-----------------------------------------------------------
From pgsql-general-owner@postgresql.org Mon Oct 7 08:24:37 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id BEF1D475B8F
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 06:00:41 -0400 (EDT)
Received: from bachata.cybertec.at (unknown [62.116.21.146])
by postgresql.org (Postfix) with SMTP id 35A79475921
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 06:00:40 -0400 (EDT)
Received: (qmail 4501 invoked from network); 7 Oct 2002 10:00:44 -0000
Received: from unknown (HELO cybertec.at) (62.116.21.147)
by 62.116.21.146 with SMTP; 7 Oct 2002 10:00:44 -0000
Message-ID: <3DA15B7C.8010005@cybertec.at>
Date: Mon, 07 Oct 2002 12:01:32 +0200
From: =?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <hs@cybertec.at>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: shridhar_daithankar@persistent.co.in,
pgsql-general@postgresql.org
Subject: Re: [pgsql-performance] Large databases, performance
References: <3DA1A331.21316.F7E742B@localhost>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/355
X-Sequence-Number: 31353
I wonder if the following changes make a difference:
- compile PostgreSQL with CFLAGS=' -O3 '
- redefine commit delays
also: keep in mind that you might gain a lot of performance by using the
SPI if you are running many similar queries
try 7.3 - as far as I remeber there is a mechanism which caches recent
execution plans.
also: some overhead was reduced (tuples, backend startup).
Hans
>Ok. I am back from my cave after some more tests are done. Here are the
>results. I am not repeating large part of it but answering your questions..
>
>Don't ask me how these numbers changed. I am not the person who conducts the
>test neither I have access to the system. Rest(or most ) of the things remains
>same..
>
>MySQL 3.23.52 with innodb transaction support:
>
>4 concurrent queries :- 257.36 ms
>40 concurrent queries :- 35.12 ms
>
>Postgresql 7.2.2
>
>4 concurrent queries :- 257.43 ms
>40 concurrent queries :- 41.16 ms
>
>Though I can not report oracle numbers, suffice to say that they fall in
>between these two numbers.
>
>Oracle seems to be hell lot faster than mysql/postgresql to load raw data even
>when it's installed on reiserfs. We plan to run XFS tests later in hope that
>that would improve mysql/postgresql load times.
>
>In this run postgresql has better load time than mysql/innodb ( 18270 sec v/s
>17031 sec.) Index creation times are faster as well (100 sec v/s 130 sec).
>Don't know what parameters are changed.
>
>Only worry is database size. Postgresql is 111GB v/s 87 GB for mysql. All
>numbers include indexes. This is really going to be a problem when things are
>deployed. Any idea how can it be taken down?
>
>WAL is out, it's not counted.
>
>Schema optimisation is later issue. Right now all three databases are using
>same schema..
>
>Will it help in this situation if I recompile posgresql with block size say 32K
>rather than 8K default? Will it saev some overhead and offer better performance
>in data load etc?
>
>Will keep you guys updated..
>
>Regards,
> Shridhar
>
>-----------------------------------------------------------
>Shridhar Daithankar
>LIMS CPE Team Member, PSPL.
>mailto:shridhar_daithankar@persistent.co.in
>Phone:- +91-20-5678900 Extn.270
>Fax :- +91-20-5678901
>-----------------------------------------------------------
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
--
*Cybertec Geschwinde u Schoenig*
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/1/913 68 09; +43/664/233 90 75
www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at
<http://cluster.postgresql.at>, www.cybertec.at
<http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at>
From pgsql-general-owner@postgresql.org Mon Oct 7 07:51:14 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 0F7B5475F4F; Mon, 7 Oct 2002 07:51:13 -0400 (EDT)
Received: from lerlaptop.iadfw.net (pppth08-291.ght.iadfw.net
[207.136.52.165])
by postgresql.org (Postfix) with ESMTP
id 45FC8475D1C; Mon, 7 Oct 2002 07:51:10 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
by lerlaptop.iadfw.net (8.12.6/8.12.5) with ESMTP id g97Boxnk000463;
Mon, 7 Oct 2002 06:51:00 -0500 (CDT) (envelope-from ler@lerctr.org)
Subject: Re: [HACKERS] cross-posts (was Re: Large databases,
From: Larry Rosenman <ler@lerctr.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Curt Sampson <cjs@cynic.net>,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-hackers@postgresql.org
In-Reply-To: <15763.1033960833@sss.pgh.pa.us>
References: <Pine.NEB.4.44.0210071124410.443-100000@angelic.cynic.net>
<15763.1033960833@sss.pgh.pa.us>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 07 Oct 2002 06:50:59 -0500
Message-Id: <1033991460.311.6.camel@lerlaptop>
Mime-Version: 1.0
X-Virus-Scanned: by amavisd-milter (http://amavis.org/)
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/339
X-Sequence-Number: 31337
On Sun, 2002-10-06 at 22:20, Tom Lane wrote:
> Curt Sampson <cjs@cynic.net> writes:
> > ... Avoiding cross-posting would be nice, since I am getting lots of
> > duplicate messages these days.
>
> Cross-posting is a fact of life, and in fact encouraged, on the pg
> lists. I suggest adapting. Try sending
> set all unique your-email-address
> to the PG majordomo server; this sets you up to get only one copy
> of each cross-posted message.
That doesn't seem to work any more:
>>>> set all unique ler@lerctr.org
**** The "all" mailing list is not supported at
**** PostgreSQL User Support Lists.
What do I need to send now?
Marc?
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
From pgsql-general-owner@postgresql.org Mon Oct 7 08:22:17 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id B9D89475F86
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 07:59:05 -0400 (EDT)
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
by postgresql.org (Postfix) with SMTP id 00081475AE5
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 07:59:03 -0400 (EDT)
Received: (qmail 24764 invoked by uid 0); 7 Oct 2002 11:59:06 -0000
Received: from chello062178186201.1.15.tuwien.teleweb.at (HELO beeblebrox)
(62.178.186.201)
by mail.gmx.net (mp008-rz3) with SMTP; 7 Oct 2002 11:59:06 -0000
Message-ID: <00f801c26df9$44465720$4201a8c0@beeblebrox>
From: "Michael Paesold" <mpaesold@gmx.at>
To: "Larry Rosenman" <ler@lerctr.org>, "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: "Curt Sampson" <cjs@cynic.net>,
"pgsql-general" <pgsql-general@postgresql.org>,
<pgsql-hackers@postgresql.org>
References: <Pine.NEB.4.44.0210071124410.443-100000@angelic.cynic.net>
<15763.1033960833@sss.pgh.pa.us> <1033991460.311.6.camel@lerlaptop>
Subject: Re: [HACKERS] cross-posts (was Re: Large databases,
Date: Mon, 7 Oct 2002 14:01:25 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/353
X-Sequence-Number: 31351
> On Sun, 2002-10-06 at 22:20, Tom Lane wrote:
> > Curt Sampson <cjs@cynic.net> writes:
> > > ... Avoiding cross-posting would be nice, since I am getting lots of
> > > duplicate messages these days.
> >
> > Cross-posting is a fact of life, and in fact encouraged, on the pg
> > lists. I suggest adapting. Try sending
> > set all unique your-email-address
> > to the PG majordomo server; this sets you up to get only one copy
> > of each cross-posted message.
> That doesn't seem to work any more:
>
> >>>> set all unique ler@lerctr.org
> **** The "all" mailing list is not supported at
> **** PostgreSQL User Support Lists.
>
> What do I need to send now?
>
> Marc?
it is:
set ALL unique your-email
if you also don't want to get emails that have already been cc'd to you, you
can use:
set ALL eliminatecc your-email
for a full list of set options send:
help set
to majordomo.
Regards,
Michael Paesold
From pgsql-general-owner@postgresql.org Mon Oct 7 08:04:46 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 6D474475F86; Mon, 7 Oct 2002 08:04:45 -0400 (EDT)
Received: from lerlaptop.iadfw.net (pppth08-291.ght.iadfw.net
[207.136.52.165])
by postgresql.org (Postfix) with ESMTP
id 25F40475F4F; Mon, 7 Oct 2002 08:04:44 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
by lerlaptop.iadfw.net (8.12.6/8.12.5) with ESMTP id g97C4Xnk000539;
Mon, 7 Oct 2002 07:04:34 -0500 (CDT) (envelope-from ler@lerctr.org)
Subject: Re: [HACKERS] cross-posts (was Re: Large databases,
From: Larry Rosenman <ler@lerctr.org>
To: Michael Paesold <mpaesold@gmx.at>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Curt Sampson <cjs@cynic.net>,
pgsql-general <pgsql-general@postgresql.org>, pgsql-hackers@postgresql.org
In-Reply-To: <00f801c26df9$44465720$4201a8c0@beeblebrox>
References: <Pine.NEB.4.44.0210071124410.443-100000@angelic.cynic.net>
<15763.1033960833@sss.pgh.pa.us> <1033991460.311.6.camel@lerlaptop>
<00f801c26df9$44465720$4201a8c0@beeblebrox>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 07 Oct 2002 07:04:33 -0500
Message-Id: <1033992275.311.12.camel@lerlaptop>
Mime-Version: 1.0
X-Virus-Scanned: by amavisd-milter (http://amavis.org/)
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/340
X-Sequence-Number: 31338
On Mon, 2002-10-07 at 07:01, Michael Paesold wrote:
> > On Sun, 2002-10-06 at 22:20, Tom Lane wrote:
> > > Curt Sampson <cjs@cynic.net> writes:
> > > > ... Avoiding cross-posting would be nice, since I am getting lots of
> > > > duplicate messages these days.
> > >
> > > Cross-posting is a fact of life, and in fact encouraged, on the pg
> > > lists. I suggest adapting. Try sending
> > > set all unique your-email-address
> > > to the PG majordomo server; this sets you up to get only one copy
> > > of each cross-posted message.
> > That doesn't seem to work any more:
> >
> > >>>> set all unique ler@lerctr.org
> > **** The "all" mailing list is not supported at
> > **** PostgreSQL User Support Lists.
> >
> > What do I need to send now?
> >
> > Marc?
>
> it is:
> set ALL unique your-email
>
> if you also don't want to get emails that have already been cc'd to you, you
> can use:
>
> set ALL eliminatecc your-email
>
> for a full list of set options send:
>
> help set
>
> to majordomo.
Thanks. That worked great. (I use Mailman, and didn't realize the ALL
needed to be capitalized.
LER
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
From pgsql-general-owner@postgresql.org Mon Oct 7 10:07:55 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 9AA5A4768CE
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 10:07:54 -0400 (EDT)
Received: from email01.aon.at (WARSL402PIP3.highway.telekom.at [195.3.96.97])
by postgresql.org (Postfix) with SMTP id 3E3D647681A
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 10:07:52 -0400 (EDT)
Received: (qmail 167656 invoked from network); 7 Oct 2002 14:07:55 -0000
Received: from m157p026.dipool.highway.telekom.at (HELO cantor)
([62.46.9.154]) (envelope-sender <mkoi-pg@aon.at>)
by qmail1rs.highway.telekom.at (qmail-ldap-1.03) with SMTP
for <shridhar?daithankar@persistent.co.in>; 7 Oct 2002 14:07:55 -0000
From: Manfred Koizar <mkoi-pg@aon.at>
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Subject: Re: Large databases, performance
Date: Mon, 07 Oct 2002 16:10:26 +0200
Message-ID: <69v2qu4n8fdt5do8dids2a9m98p0q8bu9r@4ax.com>
References: <3D9C3E05.7070906@clearmetrix.com>
<3DA1A331.21316.F7E742B@localhost>
In-Reply-To: <3DA1A331.21316.F7E742B@localhost>
X-Mailer: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/378
X-Sequence-Number: 31376
On Mon, 07 Oct 2002 15:07:29 +0530, "Shridhar Daithankar"
<shridhar_daithankar@persistent.co.in> wrote:
>Only worry is database size. Postgresql is 111GB v/s 87 GB for mysql. All
>numbers include indexes. This is really going to be a problem when things are
>deployed. Any idea how can it be taken down?
Shridhar,
if i'm not mistaken, a char(n)/varchar(n) column is stored as a 32-bit
integer specifying the length followed by as many characters as the
length tells. On 32-bit Intel hardware this structure is aligned on a
4-byte boundary.
For your row layout this gives the following sizes (look at the "phys
size" column):
| Field Field Null Indexed phys mini
| Name Type size
|--------------------------------------------
| type int no no 4 4
| esn char (10) no yes 16 11
| min char (10) no yes 16 11
| datetime timestamp no yes 8 8
| opc0 char (3) no no 8 4
| opc1 char (3) no no 8 4
| opc2 char (3) no no 8 4
| dpc0 char (3) no no 8 4
| dpc1 char (3) no no 8 4
| dpc2 char (3) no no 8 4
| npa char (3) no no 8 4
| nxx char (3) no no 8 4
| rest char (4) no no 8 5
| field0 int yes no 4 4
| field1 char (4) yes no 8 5
| field2 int yes no 4 4
| field3 char (4) yes no 8 5
| field4 int yes no 4 4
| field5 char (4) yes no 8 5
| field6 int yes no 4 4
| field7 char (4) yes no 8 5
| field8 int yes no 4 4
| field9 char (4) yes no 8 5
| ----- -----
| 176 116
Ignoring nulls for now, you have to add 32 bytes for a v7.2 heap tuple
header and 4 bytes for ItemIdData per tuple, ending up with 212 bytes
per tuple or ca. 85 GB heap space for 432000000 tuples. Depending on
fill factor similar calculations give some 30 GB for your index.
Now if we had a datatype with only one byte for the string length,
char columns could be byte aligned and we'd have column sizes given
under "mini" in the table above. The columns would have to be
rearranged according to alignment requirements.
Thus 60 bytes per heap tuple and 8 bytes per index tuple could be
saved, resulting in a database size of ~ 85 GB (index included). And
I bet this would be significantly faster, too.
Hackers, do you think it's possible to hack together a quick and dirty
patch, so that string length is represented by one byte? IOW can a
database be built that doesn't contain any char/varchar/text value
longer than 255 characters in the catalog?
If I'm not told that this is impossibly, I'd give it a try. Shridhar,
if such a patch can be made available, would you be willing to test
it?
What can you do right now? Try using v7.3 beta and creating your
table WITHOUT OIDS. This saves 8 bytes per tuple; not much, but
better save 4% than nothing.
Servus
Manfred
From pgsql-general-owner@postgresql.org Mon Oct 7 10:18:03 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id BE7454768BE
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 10:18:01 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id 6D85C476663
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 10:17:59 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g97EJar08753
for <pgsql-general@postgresql.org>; Mon, 7 Oct 2002 19:49:36 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g97EJav08731;
Mon, 7 Oct 2002 19:49:36 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Date: Mon, 07 Oct 2002 19:48:31 +0530
MIME-Version: 1.0
Subject: Re: Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3DA1E50F.4394.107FF85D@localhost>
In-reply-to: <69v2qu4n8fdt5do8dids2a9m98p0q8bu9r@4ax.com>
References: <3DA1A331.21316.F7E742B@localhost>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/382
X-Sequence-Number: 31380
On 7 Oct 2002 at 16:10, Manfred Koizar wrote:
> if i'm not mistaken, a char(n)/varchar(n) column is stored as a 32-bit
> integer specifying the length followed by as many characters as the
> length tells. On 32-bit Intel hardware this structure is aligned on a
> 4-byte boundary.
That shouldn't be necessary for a char field as space is always pre-allocated.
Sounds like a possible area of imporvement to me, if that's the case..
> Hackers, do you think it's possible to hack together a quick and dirty
> patch, so that string length is represented by one byte? IOW can a
> database be built that doesn't contain any char/varchar/text value
> longer than 255 characters in the catalog?
I say if it's a char field, there should be no indicator of length as it's not
required. Just store those many characters straight ahead..
>
> If I'm not told that this is impossibly, I'd give it a try. Shridhar,
> if such a patch can be made available, would you be willing to test
> it?
Sure. But the server machine is not available this week. Some other project is
using it. So the results won't be out unless at least a week from now.
> What can you do right now? Try using v7.3 beta and creating your
> table WITHOUT OIDS. This saves 8 bytes per tuple; not much, but
> better save 4% than nothing.
IIRC there was some header optimisation which saved 4 bytes. So without OIDs
that should save 8. Would do that as first next thing.
I talked to my friend regarding postgresql surpassing mysql substantially in
this test. He told me that the last test where postgresql took 23000+/150 sec
for load/index and mysql took 18,000+/130 index, postgresql was running in
default configuration. He forgot to copy postgresql.conf to data directory
after he modified it.
This time results are correct. Postgresql loads data faster, indexes it faster
and queries in almost same time.. Way to go..
Regards,
Shridhar
-----------------------------------------------------------
Shridhar Daithankar
LIMS CPE Team Member, PSPL.
mailto:shridhar_daithankar@persistent.co.in
Phone:- +91-20-5678900 Extn.270
Fax :- +91-20-5678901
-----------------------------------------------------------
From pgsql-general-owner@postgresql.org Mon Oct 7 10:32:46 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 981564764F9; Mon, 7 Oct 2002 10:32:44 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP
id 2F37E476879; Mon, 7 Oct 2002 10:30:55 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g97EUbhR023490;
Mon, 7 Oct 2002 10:30:37 -0400 (EDT)
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Subject: Re: [pgsql-performance] Large databases, performance
In-reply-to: <3DA1A331.21316.F7E742B@localhost>
References: <3DA1A331.21316.F7E742B@localhost>
Comments: In-reply-to "Shridhar Daithankar"
<shridhar_daithankar@persistent.co.in>
message dated "Mon, 07 Oct 2002 15:07:29 +0530"
Date: Mon, 07 Oct 2002 10:30:37 -0400
Message-ID: <23489.1034001037@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/383
X-Sequence-Number: 31381
"Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes:
> MySQL 3.23.52 with innodb transaction support:
> 4 concurrent queries :- 257.36 ms
> 40 concurrent queries :- 35.12 ms
> Postgresql 7.2.2
> 4 concurrent queries :- 257.43 ms
> 40 concurrent queries :- 41.16 ms
I find this pretty fishy. The extreme similarity of the 4-client
numbers seems improbable, from what I know of the two databases.
I suspect your numbers are mostly measuring some non-database-related
overhead --- communications overhead, maybe?
> Only worry is database size. Postgresql is 111GB v/s 87 GB for mysql. All
> numbers include indexes. This is really going to be a problem when things are
> deployed. Any idea how can it be taken down?
7.3 should be a little bit better because of Manfred's work on reducing
tuple header size --- if you create your tables WITHOUT OIDS, you should
save 8 bytes per row compared to earlier releases.
regards, tom lane
From pgsql-general-owner@postgresql.org Mon Oct 7 10:39:28 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 721BA476358
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 10:39:25 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id 940DB476237
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 10:39:22 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g97EexL11100
for <pgsql-general@postgresql.org>; Mon, 7 Oct 2002 20:10:59 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g97Eexv11090;
Mon, 7 Oct 2002 20:10:59 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Date: Mon, 07 Oct 2002 20:09:55 +0530
MIME-Version: 1.0
Subject: Re: [pgsql-performance] Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3DA1EA13.16626.10939155@localhost>
References: <3DA1A331.21316.F7E742B@localhost>
In-reply-to: <23489.1034001037@sss.pgh.pa.us>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/384
X-Sequence-Number: 31382
On 7 Oct 2002 at 10:30, Tom Lane wrote:
> "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes:
> > MySQL 3.23.52 with innodb transaction support:
>
> > 4 concurrent queries :- 257.36 ms
> > 40 concurrent queries :- 35.12 ms
>
> > Postgresql 7.2.2
>
> > 4 concurrent queries :- 257.43 ms
> > 40 concurrent queries :- 41.16 ms
>
> I find this pretty fishy. The extreme similarity of the 4-client
> numbers seems improbable, from what I know of the two databases.
> I suspect your numbers are mostly measuring some non-database-related
> overhead --- communications overhead, maybe?
I don't know but three numbers, postgresql/mysql/oracle all are 25x.xx ms. The
clients were on same machie as of server. So no real area to point at..
>
> > Only worry is database size. Postgresql is 111GB v/s 87 GB for mysql. All
> > numbers include indexes. This is really going to be a problem when things are
> > deployed. Any idea how can it be taken down?
>
> 7.3 should be a little bit better because of Manfred's work on reducing
> tuple header size --- if you create your tables WITHOUT OIDS, you should
> save 8 bytes per row compared to earlier releases.
Got it..
Bye
Shridhar
--
Sweater, n.: A garment worn by a child when its mother feels chilly.
From pgsql-general-owner@postgresql.org Mon Oct 7 11:22:09 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 0069A47621C; Mon, 7 Oct 2002 11:22:09 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP
id 520A5476720; Mon, 7 Oct 2002 11:21:58 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g97FLvhR023898;
Mon, 7 Oct 2002 11:21:57 -0400 (EDT)
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Subject: Re: [pgsql-performance] Large databases, performance
In-reply-to: <3DA1E50F.4394.107FF85D@localhost>
References: <3DA1A331.21316.F7E742B@localhost>
<3DA1E50F.4394.107FF85D@localhost>
Comments: In-reply-to "Shridhar Daithankar"
<shridhar_daithankar@persistent.co.in>
message dated "Mon, 07 Oct 2002 19:48:31 +0530"
Date: Mon, 07 Oct 2002 11:21:57 -0400
Message-ID: <23897.1034004117@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/390
X-Sequence-Number: 31388
"Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes:
> I say if it's a char field, there should be no indicator of length as
> it's not required. Just store those many characters straight ahead..
Your assumption fails when considering UNICODE or other multibyte
character encodings.
regards, tom lane
From pgsql-general-owner@postgresql.org Mon Oct 7 11:20:14 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id BD062476353
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 11:20:13 -0400 (EDT)
Received: from email04.aon.at (WARSL402PIP5.highway.telekom.at [195.3.96.79])
by postgresql.org (Postfix) with SMTP id 5403247621C
for <pgsql-general@postgresql.org>;
Mon, 7 Oct 2002 11:20:08 -0400 (EDT)
Received: (qmail 367988 invoked from network); 7 Oct 2002 15:20:09 -0000
Received: from m165p018.dipool.highway.telekom.at (HELO cantor)
([62.46.10.146]) (envelope-sender <mkoi-pg@aon.at>)
by qmail5rs.highway.telekom.at (qmail-ldap-1.03) with SMTP
for <shridhar?daithankar@persistent.co.in>; 7 Oct 2002 15:20:09 -0000
From: Manfred Koizar <mkoi-pg@aon.at>
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Subject: Re: Large databases, performance
Date: Mon, 07 Oct 2002 17:22:41 +0200
Message-ID: <cl83quoi1kt2ebcsbajm18iekkporrj9f5@4ax.com>
References: <3DA1A331.21316.F7E742B@localhost>
<69v2qu4n8fdt5do8dids2a9m98p0q8bu9r@4ax.com>
<3DA1E50F.4394.107FF85D@localhost>
In-Reply-To: <3DA1E50F.4394.107FF85D@localhost>
X-Mailer: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/389
X-Sequence-Number: 31387
On Mon, 07 Oct 2002 19:48:31 +0530, "Shridhar Daithankar"
<shridhar_daithankar@persistent.co.in> wrote:
>I say if it's a char field, there should be no indicator of length as it's not
>required. Just store those many characters straight ahead..
This is out of reach for a quick hack ...
>Sure. But the server machine is not available this week. Some other project is
>using it. So the results won't be out unless at least a week from now.
:-)
>This time results are correct. Postgresql loads data faster, indexes it faster
>and queries in almost same time.. Way to go..
Great! And now let's work on making selects faster, too.
Servus
Manfred
From pgsql-general-owner@postgresql.org Tue Oct 8 12:37:36 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 333D0476792; Mon, 7 Oct 2002 11:42:17 -0400 (EDT)
Received: from smxsat1.smxs.net (smxsat1.smxs.net [213.150.10.1])
by postgresql.org (Postfix) with ESMTP
id AF8684767BE; Mon, 7 Oct 2002 11:42:14 -0400 (EDT)
Received: from m01x1.s-mxs.net [10.3.55.201] by smxsat1.smxs.net
over TLS secured channel with XWall v3.22i ;
Mon, 7 Oct 2002 17:42:14 +0200
Received: from m0102.s-mxs.net [10.3.55.2] by m01x1.s-mxs.net
with XWall v3.22h ; Mon, 7 Oct 2002 17:42:13 +0200
Received: from m0114.s-mxs.net ([10.3.55.14]) by m0102.s-mxs.net with
Microsoft SMTPSVC(5.0.2195.5329); Mon, 7 Oct 2002 17:42:12 +0200
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject: Re: [HACKERS] Large databases, performance
Date: Mon, 7 Oct 2002 17:42:12 +0200
Message-ID: <46C15C39FEB2C44BA555E356FBCD6FA4887A5A@m0114.s-mxs.net>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [HACKERS] [GENERAL] Large databases, performance
Thread-Index: AcJuC2mXfpTsQsS8SYipEwKJNAatyAADFkzQ
From: "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
To: "Manfred Koizar" <mkoi-pg@aon.at>, <shridhar_daithankar@persistent.co.in>
Cc: <pgsql-hackers@postgresql.org>,
"pgsql-general" <pgsql-general@postgresql.org>,
<pgsql-performance@postgresql.org>
X-OriginalArrivalTime: 07 Oct 2002 15:42:12.0994 (UTC)
FILETIME=[1AEF0E20:01C26E18]
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/462
X-Sequence-Number: 31460
> if i'm not mistaken, a char(n)/varchar(n) column is stored as a 32-bit
> integer specifying the length followed by as many characters as the
> length tells. On 32-bit Intel hardware this structure is aligned on a
> 4-byte boundary.
Yes.
> | opc0 char (3) no no 8 4
> | opc1 char (3) no no 8 4
> | opc2 char (3) no no 8 4
> Hackers, do you think it's possible to hack together a quick and dirty
> patch, so that string length is represented by one byte? IOW can a
> database be built that doesn't contain any char/varchar/text value
> longer than 255 characters in the catalog?
Since he is only using fixchar how about doing a fixchar implemetation, tha=
t=20
does not store length at all ? It is the same for every row anyways !
Andreas
From pgsql-general-owner@postgresql.org Mon Oct 7 15:21:11 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 11E9B4768E9; Mon, 7 Oct 2002 15:21:11 -0400 (EDT)
Received: from edisonaffiliates.com (w205.z208176060.chi-il.dsl.cnc.net
[208.176.60.205]) by postgresql.org (Postfix) with SMTP
id 04BA947671D; Mon, 7 Oct 2002 15:19:54 -0400 (EDT)
Received: from redhen ([12.32.94.66]) by edisonaffiliates.com ;
Mon, 07 Oct 2002 14:15:01 -0500
Reply-To: <marie.tuite@edisonaffiliates.com>
From: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
To: "Pgsql-General@Postgresql. Org" <pgsql-general@postgresql.org>,
<pgsql-performance@postgresql.org>
Subject: sloooow query
Date: Mon, 7 Oct 2002 14:22:09 -0500
Message-ID: <IGELKLINGDMODABPOOFEKEAPCJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/404
X-Sequence-Number: 31402
Hello all,
I am experiencing slow db performance. I have vacuumed, analyzed, reindexed
using the force option and performance remains the same - dog-slow :( If I
drop and recreate the database, performance is normal, so this suggests a
problem with the indexes? I also took a look at the postgresql.conf and all
appears fine. There are many instances of the same database running on
different servers and not all servers are experiencing the problem.
Thanks in advance for any suggestions.
Marie
From pgsql-performance-owner@postgresql.org Mon Oct 7 15:26:53 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 739A447691D
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 15:26:52 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id A46524768E9
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 15:26:51 -0400 (EDT)
Received: from [66.219.92.2] (HELO chocolate-mousse)
by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP id 1774269; Mon, 07 Oct 2002 12:25:23 -0700
Content-Type: text/plain;
charset="iso-8859-1"
From: Josh Berkus <josh@agliodbs.com>
Reply-To: josh@agliodbs.com
Organization: Aglio Database Solutions
To: <marie.tuite@edisonaffiliates.com>,
<pgsql-performance@postgresql.org>
Subject: Re: sloooow query
Date: Mon, 7 Oct 2002 12:29:17 -0700
X-Mailer: KMail [version 1.4]
References: <IGELKLINGDMODABPOOFEKEAPCJAA.marie.tuite@edisonaffiliates.com>
In-Reply-To: <IGELKLINGDMODABPOOFEKEAPCJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210071229.17873.josh@agliodbs.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/39
X-Sequence-Number: 56
Marie,
> I am experiencing slow db performance. I have vacuumed, analyzed, reinde=
xed
> using the force option and performance remains the same - dog-slow :( If=
I
> drop and recreate the database, performance is normal, so this suggests a
> problem with the indexes? I also took a look at the postgresql.conf and =
all
> appears fine. There are many instances of the same database running on
> different servers and not all servers are experiencing the problem.
Please post the following:
1) A copy of the relevant portions of your database schema.
2) The query that is running slowly.
3) The results of running EXPLAIN on that query.
4) Your PostgreSQL version and operating system
5) Any other relevant information about your databases, such as the quantit=
y=20
of inserts and deletes on the relevant tables.
--=20
-Josh Berkus
Aglio Database Solutions
San Francisco
From pgsql-performance-owner@postgresql.org Mon Oct 7 15:30:09 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 62DD5475F80
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 15:30:08 -0400 (EDT)
Received: from new-smtp2.ihug.com.au (new-smtp2.ihug.com.au [203.109.250.28])
by postgresql.org (Postfix) with ESMTP id AF89F475F66
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 15:30:07 -0400 (EDT)
Received: from p393-tnt2.mel.ihug.com.au (postgresql.org) [203.173.165.139]
by new-smtp2.ihug.com.au with esmtp (Exim 3.22 #1 (Debian))
id 17ydZt-0006Ew-00; Tue, 08 Oct 2002 05:30:05 +1000
Message-ID: <3DA1E0BB.236FCC17@postgresql.org>
Date: Tue, 08 Oct 2002 05:30:03 +1000
From: Justin Clift <justin@postgresql.org>
X-Mailer: Mozilla 4.79 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: josh@agliodbs.com
Cc: marie.tuite@edisonaffiliates.com,
pgsql-performance@postgresql.org
Subject: Re: sloooow query
References: <IGELKLINGDMODABPOOFEKEAPCJAA.marie.tuite@edisonaffiliates.com>
<200210071229.17873.josh@agliodbs.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/40
X-Sequence-Number: 57
Josh Berkus wrote:
>
> Marie,
>
> > I am experiencing slow db performance. I have vacuumed, analyzed, reindexed
> > using the force option and performance remains the same - dog-slow :( If I
> > drop and recreate the database, performance is normal, so this suggests a
> > problem with the indexes? I also took a look at the postgresql.conf and all
> > appears fine. There are many instances of the same database running on
> > different servers and not all servers are experiencing the problem.
>
> Please post the following:
> 1) A copy of the relevant portions of your database schema.
> 2) The query that is running slowly.
> 3) The results of running EXPLAIN on that query.
> 4) Your PostgreSQL version and operating system
> 5) Any other relevant information about your databases, such as the quantity
> of inserts and deletes on the relevant tables.
6) And the sort_mem, shared_buffers, vacuum_mem, wal_buffers, and
wal_files settings from your postgresql.conf file, if possible.
:-)
Regards and best wishes,
Justin Clift
> --
> -Josh Berkus
> Aglio Database Solutions
> San Francisco
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
From pgsql-performance-owner@postgresql.org Mon Oct 7 15:46:58 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 8EA88475FC6
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 15:46:56 -0400 (EDT)
Received: from edisonaffiliates.com (w205.z208176060.chi-il.dsl.cnc.net
[208.176.60.205])
by postgresql.org (Postfix) with SMTP id A9A2E475F80
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 15:46:55 -0400 (EDT)
Received: from redhen ([12.32.94.66]) by edisonaffiliates.com ;
Mon, 07 Oct 2002 14:42:08 -0500
Reply-To: <marie.tuite@edisonaffiliates.com>
From: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
To: <josh@agliodbs.com>, <pgsql-performance@postgresql.org>
Subject: Re: sloooow query
Date: Mon, 7 Oct 2002 14:49:16 -0500
Message-ID: <IGELKLINGDMODABPOOFEMEBBCJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
In-Reply-To: <200210071229.17873.josh@agliodbs.com>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/41
X-Sequence-Number: 58
Josh,
Thanks for the reply.
I pg_dumped the first database having performance problems and reloaded it
into a new database on the same server. The query ran normally when I
reloaded it. There is no difference in hardware, schema or anything else.
project=# select version();
version
-------------------------------------------------------------
PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)
[mtuite@area52 mtuite]$ uname -a
Linux area52.spacedock.com 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686
unknown
Below is the explain for the reload.
bm221=# \i bad.qry
psql:bad.qry:78: NOTICE: QUERY PLAN:
Sort (cost=273.71..273.71 rows=1 width=237) (actual time=143.82..143.96
rows=181 loops=1)
-> Group (cost=273.53..273.70 rows=1 width=237) (actual
time=136.98..140.78 rows=181 loops=1)
-> Sort (cost=273.53..273.53 rows=7 width=237) (actual
time=136.95..137.11 rows=181 loops=1)
-> Merge Join (cost=273.37..273.43 rows=7 width=237) (actual
time=124.41..129.72 rows=181 loops=1)
-> Sort (cost=162.24..162.24 rows=7 width=216) (actual
time=51.83..52.00 rows=181 loops=1)
-> Subquery Scan student_set
(cost=161.09..162.14 rows=7 width=216) (actual time=48.12..50.49 rows=181
loops=1)
-> Unique (cost=161.09..162.14 rows=7
width=216) (actual time=48.10..49.45 rows=181 loops=1)
-> Sort (cost=161.09..161.09 rows=70
width=216) (actual time=48.09..48.26 rows=181 loops=1)
-> Hash Join
(cost=130.58..158.96 rows=70 width=216) (actual time=43.26..47.11 rows=181
loops=1)
-> Seq Scan on classes c
(cost=0.00..20.00 rows=1000 width=72) (actual time=0.12..1.78 rows=332
loops=1)
-> Hash
(cost=130.55..130.55 rows=14 width=144) (actual time=43.02..43.02 rows=0
loops=1)
-> Hash Join
(cost=105.38..130.55 rows=14 width=144) (actual time=31.13..42.44 rows=181
loops=1)
-> Seq Scan
on user_common uc (cost=0.00..20.00 rows=1000 width=80) (actual
time=0.12..7.07 rows=1045 loops=1)
-> Hash
(cost=105.37..105.37 rows=3 width=64) (actual time=30.91..30.91 rows=0
loops=1)
-> Hash
Join (cost=77.46..105.37 rows=3 width=64) (actual time=4.79..30.46 rows=181
loops=1)
->
Seq Scan on student_class_rlt scr (cost=0.00..22.50 rows=995 width=24)
(actual time=0.25..23.74 rows=527 loops=1)
->
Hash (cost=77.45..77.45 rows=5 width=40) (actual time=4.02..4.02 rows=0
loops=1)
-> Hash Join (cost=52.38..77.45 rows=5 width=40) (actual
time=3.28..3.96 rows=27 loops=1)
-> Seq Scan on bm_subscriptions_rlt bsr (cost=0.00..20.00
rows=1000 width=8) (actual time=0.11..0.47 rows=114 loops=1)
-> Hash (cost=52.38..52.38 rows=1 width=32) (actual
time=3.10..3.10 rows=0 loops=1)
-> Hash Join (cost=4.83..52.38 rows=1 width=32) (actual
time=2.23..3.07 rows=11 loops=1)
-> Seq Scan on bm_publications bp (cost=0.00..47.50
rows=11 width=12) (actual time=1.49..2.25 rows=11 loops=1)
-> Hash (cost=4.82..4.82 rows=1 width=20) (actual time=0.63..0.63
rows=0 loops=1)
-> Index Scan using bm_publication_events_pkey
on bm_publication_events bpe (cost=0.00..4.82 rows=1 width=20) (actual
time=0.60..0.61 rows=1 loops=1)
-> Sort (cost=111.13..111.13 rows=18 width=21) (actual
time=72.51..73.15 rows=770 loops=1)
-> Subquery Scan participation_set
(cost=22.51..110.75 rows=18 width=21) (actual time=1.32..57.28 rows=809
loops=1)
-> Hash Join (cost=22.51..110.75 rows=18
width=21) (actual time=1.30..52.21 rows=809 loops=1)
-> Seq Scan on bm_user_results bur
(cost=0.00..70.01 rows=3601 width=17) (actual time=0.14..18.53 rows=3601
loops=1)
-> Hash (cost=22.50..22.50 rows=5
width=4) (actual time=0.91..0.91 rows=0 loops=1)
-> Seq Scan on bm_publications
bp (cost=0.00..22.50 rows=5 width=4) (actual time=0.33..0.71 rows=98
loops=1)
Total runtime: 145.69 msec
EXPLAIN
bm221=#
Here is the explain from the original database:
project=# \i bad.qry
psql:bad.qry:78: NOTICE: QUERY PLAN:
Sort (cost=337.23..337.23 rows=1 width=237) (actual time=14903.87..14904.05
rows=181 loops=1)
-> Group (cost=337.19..337.22 rows=1 width=237) (actual
time=14895.90..14900.55 rows=181 loops=1)
-> Sort (cost=337.19..337.19 rows=1 width=237) (actual
time=14895.87..14896.09 rows=181 loops=1)
-> Nested Loop (cost=214.62..337.18 rows=1 width=237)
(actual time=149.50..14886.63 rows=181 loops=1)
-> Subquery Scan student_set (cost=208.82..208.84
rows=1 width=115) (actual time=64.03..69.44 rows=181 loops=1)
-> Unique (cost=208.82..208.84 rows=1 width=115)
(actual time=64.02..67.25 rows=181 loops=1)
-> Sort (cost=208.82..208.82 rows=1
width=115) (actual time=64.01..64.36 rows=181 loops=1)
-> Nested Loop (cost=16.54..208.81
rows=1 width=115) (actual time=5.21..62.66 rows=181 loops=1)
-> Nested Loop
(cost=16.54..203.55 rows=1 width=88) (actual time=5.11..52.60 rows=181
loops=1)
-> Hash Join
(cost=16.54..197.63 rows=1 width=64) (actual time=4.55..37.75 rows=181
loops=1)
-> Seq Scan on
student_class_rlt scr (cost=0.00..178.16 rows=574 width=24) (actual
time=0.02..29.59 rows=527 loops=1)
-> Hash
(cost=16.54..16.54 rows=2 width=40) (actual time=3.84..3.84 rows=0 loops=1)
-> Hash Join
(cost=13.80..16.54 rows=2 width=40) (actual time=2.91..3.77 rows=27 loops=1)
-> Seq
Scan on bm_subscriptions_rlt bsr (cost=0.00..2.14 rows=114 width=8) (actual
time=0.01..0.50 rows=114 loops=1)
-> Hash
(cost=13.80..13.80 rows=2 width=32) (actual time=2.81..2.81 rows=0 loops=1)
->
Hash Join (cost=1.06..13.80 rows=2 width=32) (actual time=1.74..2.78
rows=11 loops=1)
-> Seq Scan on bm_publications bp (cost=0.00..12.65 rows=11 width=12)
(actual time=1.56..2.51 rows=11 loops=1)
-> Hash (cost=1.06..1.06 rows=1 width=20) (actual time=0.06..0.06
rows=0 loops=1)
-> Seq Scan on bm_publication_events bpe (cost=0.00..1.06 rows=1
width=20) (actual time=0.04..0.05 rows=1 loops=1)
-> Index Scan using
user_common_pkey on user_common uc (cost=0.00..5.90 rows=1 width=24)
(actual time=0.05..0.06 rows=1 loops=181)
-> Index Scan using class_pkey
on classes c (cost=0.00..5.25 rows=1 width=27) (actual time=0.03..0.04
rows=1 loops=181)
-> Subquery Scan participation_set (cost=5.79..109.63
rows=1248 width=21) (actual time=1.19..78.18 rows=816 loops=181)
-> Hash Join (cost=5.79..109.63 rows=1248
width=21) (actual time=1.18..71.10 rows=816 loops=181)
-> Seq Scan on bm_user_results bur
(cost=0.00..70.16 rows=3616 width=17) (actual time=0.01..20.96 rows=3620
loops=181)
-> Hash (cost=5.55..5.55 rows=98 width=4)
(actual time=1.05..1.05 rows=0 loops=181)
-> Seq Scan on bm_publications bp
(cost=0.00..5.55 rows=98 width=4) (actual time=0.33..0.82 rows=98 loops=181)
Total runtime: 14905.87 msec
EXPLAIN
project=#
Here is the query:
explain analyze
select
student_set.pub_id as pub_id,
student_set.class_id as class,
student_set.class_name as class_name,
student_set.user_id as student,
student_set.first_name,
student_set.last_name,
participation_set.started,
participation_set.complete,
day,month
from
(
select distinct
scr.user_id,
scr.class_id,
uc.first_name,
uc.last_name,
bp.bm_publication_id as pub_id,
c.class_name
from student_class_rlt scr,
user_common uc,
bm_subscriptions_rlt bsr,
bm_publications bp CROSS JOIN
bm_publication_events bpe,
classes c
where
bpe.bm_publication_event_id = 4
and bpe.bm_publication_event_id =
bp.bm_publication_event_id
and bp.bm_series_id = bsr.bm_series_id
and bsr.class_id = scr.class_id
and scr.class_id = c.class_id
and (scr.end_date is null or scr.end_date >=
bpe.due_date)
and scr.start_date <= bpe.publication_date
and scr.status_id != 2
and scr.user_id = uc.user_id
and bp.bm_publication_id in (
4,25,1,3,26,19,
,11,27,90,20,28
)
) student_set
left join
(
select user_id,
initial_timestmp as started,
to_char( initial_timestmp, 'MM/DD' ) as
day,
to_char( initial_timestmp, 'Month YYYY' )
as month,
complete,
bur.bm_publication_id as pub_id
from
bm_publications bp,
bm_user_results bur
where
bp.bm_publication_event_id = 4
and bp.bm_publication_id = bur.bm_publication_id
) participation_set
on
(
student_set.user_id =
participation_set.user_id
and student_set.pub_id =
participation_set.pub_id
)
group by student_set.pub_id, class, class_name, student,
last_name, first_name, started, complete, day, month
order by student_set.pub_id, class, last_name, month, day
;
Thanks.
> -----Original Message-----
> From: pgsql-performance-owner@postgresql.org
> [mailto:pgsql-performance-owner@postgresql.org]On Behalf Of Josh Berkus
> Sent: Monday, October 07, 2002 2:29 PM
> To: marie.tuite@edisonaffiliates.com; pgsql-performance@postgresql.org
> Subject: Re: [pgsql-performance] sloooow query
>
>
>
> Marie,
>
> > I am experiencing slow db performance. I have vacuumed,
> analyzed, reindexed
> > using the force option and performance remains the same -
> dog-slow :( If I
> > drop and recreate the database, performance is normal, so this
> suggests a
> > problem with the indexes? I also took a look at the
> postgresql.conf and all
> > appears fine. There are many instances of the same database running on
> > different servers and not all servers are experiencing the problem.
>
> Please post the following:
> 1) A copy of the relevant portions of your database schema.
> 2) The query that is running slowly.
> 3) The results of running EXPLAIN on that query.
> 4) Your PostgreSQL version and operating system
> 5) Any other relevant information about your databases, such as
> the quantity
> of inserts and deletes on the relevant tables.
>
> --
> -Josh Berkus
> Aglio Database Solutions
> San Francisco
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
From pgsql-performance-owner@postgresql.org Mon Oct 7 15:51:15 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id A80B04760D3; Mon, 7 Oct 2002 15:51:14 -0400 (EDT)
Received: from edisonaffiliates.com (w205.z208176060.chi-il.dsl.cnc.net
[208.176.60.205]) by postgresql.org (Postfix) with SMTP
id C08264760CE; Mon, 7 Oct 2002 15:51:13 -0400 (EDT)
Received: from redhen ([12.32.94.66]) by edisonaffiliates.com ;
Mon, 07 Oct 2002 14:46:27 -0500
Reply-To: <marie.tuite@edisonaffiliates.com>
From: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
To: "Justin Clift" <justin@postgresql.org>, <josh@agliodbs.com>
Cc: <pgsql-performance@postgresql.org>
Subject: Re: sloooow query
Date: Mon, 7 Oct 2002 14:53:35 -0500
Message-ID: <IGELKLINGDMODABPOOFEEEBCCJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
In-Reply-To: <3DA1E0BB.236FCC17@postgresql.org>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/42
X-Sequence-Number: 59
Here is a show all:
Thanks,
project-# ;
NOTICE: enable_seqscan is on
NOTICE: enable_indexscan is on
NOTICE: enable_tidscan is on
NOTICE: enable_sort is on
NOTICE: enable_nestloop is on
NOTICE: enable_mergejoin is on
NOTICE: enable_hashjoin is on
NOTICE: ksqo is off
NOTICE: geqo is on
NOTICE: tcpip_socket is on
NOTICE: ssl is off
NOTICE: fsync is on
NOTICE: silent_mode is off
NOTICE: log_connections is off
NOTICE: log_timestamp is off
NOTICE: log_pid is off
NOTICE: debug_print_query is off
NOTICE: debug_print_parse is off
NOTICE: debug_print_rewritten is off
NOTICE: debug_print_plan is off
NOTICE: debug_pretty_print is off
NOTICE: show_parser_stats is off
NOTICE: show_planner_stats is off
NOTICE: show_executor_stats is off
NOTICE: show_query_stats is off
NOTICE: stats_start_collector is on
NOTICE: stats_reset_on_server_start is on
NOTICE: stats_command_string is off
NOTICE: stats_row_level is off
NOTICE: stats_block_level is off
NOTICE: trace_notify is off
NOTICE: hostname_lookup is off
NOTICE: show_source_port is off
NOTICE: sql_inheritance is on
NOTICE: australian_timezones is off
NOTICE: fixbtree is on
NOTICE: password_encryption is off
NOTICE: transform_null_equals is off
NOTICE: geqo_threshold is 11
NOTICE: geqo_pool_size is 0
NOTICE: geqo_effort is 1
NOTICE: geqo_generations is 0
NOTICE: geqo_random_seed is -1
NOTICE: deadlock_timeout is 1000
NOTICE: syslog is 0
NOTICE: max_connections is 64
NOTICE: shared_buffers is 128
NOTICE: port is 5432
NOTICE: unix_socket_permissions is 511
NOTICE: sort_mem is 1024
NOTICE: vacuum_mem is 8192
NOTICE: max_files_per_process is 1000
NOTICE: debug_level is 0
NOTICE: max_expr_depth is 10000
NOTICE: max_fsm_relations is 100
NOTICE: max_fsm_pages is 10000
NOTICE: max_locks_per_transaction is 64
NOTICE: authentication_timeout is 60
NOTICE: pre_auth_delay is 0
NOTICE: checkpoint_segments is 3
NOTICE: checkpoint_timeout is 300
NOTICE: wal_buffers is 8
NOTICE: wal_files is 0
NOTICE: wal_debug is 0
NOTICE: commit_delay is 0
NOTICE: commit_siblings is 5
NOTICE: effective_cache_size is 1000
NOTICE: random_page_cost is 4
NOTICE: cpu_tuple_cost is 0.01
NOTICE: cpu_index_tuple_cost is 0.001
NOTICE: cpu_operator_cost is 0.0025
NOTICE: geqo_selection_bias is 2
NOTICE: default_transaction_isolation is read committed
NOTICE: dynamic_library_path is $libdir
NOTICE: krb_server_keyfile is FILE:/etc/pgsql/krb5.keytab
NOTICE: syslog_facility is LOCAL0
NOTICE: syslog_ident is postgres
NOTICE: unix_socket_group is unset
NOTICE: unix_socket_directory is unset
NOTICE: virtual_host is unset
NOTICE: wal_sync_method is fdatasync
NOTICE: DateStyle is ISO with US (NonEuropean) conventions
NOTICE: Time zone is unset
NOTICE: TRANSACTION ISOLATION LEVEL is READ COMMITTED
NOTICE: Current client encoding is 'SQL_ASCII'
NOTICE: Current server encoding is 'SQL_ASCII'
NOTICE: Seed for random number generator is unavailable
SHOW VARIABLE
project=#
> -----Original Message-----
> From: pgsql-performance-owner@postgresql.org
> [mailto:pgsql-performance-owner@postgresql.org]On Behalf Of Justin Clift
> Sent: Monday, October 07, 2002 2:30 PM
> To: josh@agliodbs.com
> Cc: marie.tuite@edisonaffiliates.com; pgsql-performance@postgresql.org
> Subject: Re: [pgsql-performance] sloooow query
>
>
> Josh Berkus wrote:
> >
> > Marie,
> >
> > > I am experiencing slow db performance. I have vacuumed,
> analyzed, reindexed
> > > using the force option and performance remains the same -
> dog-slow :( If I
> > > drop and recreate the database, performance is normal, so
> this suggests a
> > > problem with the indexes? I also took a look at the
> postgresql.conf and all
> > > appears fine. There are many instances of the same database
> running on
> > > different servers and not all servers are experiencing the problem.
> >
> > Please post the following:
> > 1) A copy of the relevant portions of your database schema.
> > 2) The query that is running slowly.
> > 3) The results of running EXPLAIN on that query.
> > 4) Your PostgreSQL version and operating system
> > 5) Any other relevant information about your databases, such as
> the quantity
> > of inserts and deletes on the relevant tables.
>
> 6) And the sort_mem, shared_buffers, vacuum_mem, wal_buffers, and
> wal_files settings from your postgresql.conf file, if possible.
>
> :-)
>
> Regards and best wishes,
>
> Justin Clift
>
>
> > --
> > -Josh Berkus
> > Aglio Database Solutions
> > San Francisco
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
>
> --
> "My grandfather once told me that there are two kinds of people: those
> who work and those who take the credit. He told me to try to be in the
> first group; there was less competition there."
> - Indira Gandhi
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
From pgsql-performance-owner@postgresql.org Mon Oct 7 16:10:01 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id EB42C476807
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:09:59 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id A204B476709
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:09:53 -0400 (EDT)
Received: from [66.219.92.2] (HELO chocolate-mousse)
by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP id 1774389; Mon, 07 Oct 2002 13:08:27 -0700
Content-Type: text/plain;
charset="iso-8859-1"
From: Josh Berkus <josh@agliodbs.com>
Reply-To: josh@agliodbs.com
Organization: Aglio Database Solutions
To: <marie.tuite@edisonaffiliates.com>,
<pgsql-performance@postgresql.org>
Subject: Re: sloooow query
Date: Mon, 7 Oct 2002 13:12:21 -0700
X-Mailer: KMail [version 1.4]
References: <IGELKLINGDMODABPOOFEMEBBCJAA.marie.tuite@edisonaffiliates.com>
In-Reply-To: <IGELKLINGDMODABPOOFEMEBBCJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210071312.21476.josh@agliodbs.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/43
X-Sequence-Number: 60
Marie,
> I pg_dumped the first database having performance problems and reloaded it
> into a new database on the same server. The query ran normally when I
> reloaded it. There is no difference in hardware, schema or anything else.
That's a pretty brutal query.=20=20
From the comparison between the two queries, it looks like you have a lot o=
f=20
discarded rows cluttering up the original database, just like I did.=20=20
What happens if you run VACUUM FULL VERBOSE on the Bad database? Does it=
=20
report lots of rows taken up?
--=20
-Josh Berkus
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
From pgsql-performance-owner@postgresql.org Mon Oct 7 16:15:39 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 2771F4763F5
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:15:39 -0400 (EDT)
Received: from new-smtp2.ihug.com.au (new-smtp2.ihug.com.au [203.109.250.28])
by postgresql.org (Postfix) with ESMTP id 02D32476237
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:15:38 -0400 (EDT)
Received: from p393-tnt2.mel.ihug.com.au (postgresql.org) [203.173.165.139]
by new-smtp2.ihug.com.au with esmtp (Exim 3.22 #1 (Debian))
id 17yeHx-0002cM-00; Tue, 08 Oct 2002 06:15:38 +1000
Message-ID: <3DA1EB67.7D717CB0@postgresql.org>
Date: Tue, 08 Oct 2002 06:15:35 +1000
From: Justin Clift <justin@postgresql.org>
X-Mailer: Mozilla 4.79 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: marie.tuite@edisonaffiliates.com
Cc: josh@agliodbs.com, pgsql-performance@postgresql.org
Subject: Re: sloooow query
References: <IGELKLINGDMODABPOOFEEEBCCJAA.marie.tuite@edisonaffiliates.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/44
X-Sequence-Number: 61
Hi Marie,
Ok, not sure about the SQL side of things (got scared just *looking* at
that query), but if this is at least a mostly-dedicated database server
then you might want to bump up some of those buffer values. They look
like defaults (except the max_connections and shared buffers).
Initial thought is making just sort_mem = 8192 or so as a minimum (it
could go a lot higher, but not sure of your memory configuration), as
see if that makes a difference.
Not sure the wal_files = 0 bit is good either. Haven't seen that set to
0 before.
Might not assist with your present crisis, but am guessing PostgreSQL is
chewing a lot of CPU and being slow in general with the present
settings.
:-)
Regards and best wishes,
Justin Clift
"Marie G. Tuite" wrote:
>
> Here is a show all:
>
> Thanks,
>
> project-# ;
> NOTICE: enable_seqscan is on
> NOTICE: enable_indexscan is on
> NOTICE: enable_tidscan is on
> NOTICE: enable_sort is on
> NOTICE: enable_nestloop is on
> NOTICE: enable_mergejoin is on
> NOTICE: enable_hashjoin is on
> NOTICE: ksqo is off
> NOTICE: geqo is on
> NOTICE: tcpip_socket is on
> NOTICE: ssl is off
> NOTICE: fsync is on
> NOTICE: silent_mode is off
> NOTICE: log_connections is off
> NOTICE: log_timestamp is off
> NOTICE: log_pid is off
> NOTICE: debug_print_query is off
> NOTICE: debug_print_parse is off
> NOTICE: debug_print_rewritten is off
> NOTICE: debug_print_plan is off
> NOTICE: debug_pretty_print is off
> NOTICE: show_parser_stats is off
> NOTICE: show_planner_stats is off
> NOTICE: show_executor_stats is off
> NOTICE: show_query_stats is off
> NOTICE: stats_start_collector is on
> NOTICE: stats_reset_on_server_start is on
> NOTICE: stats_command_string is off
> NOTICE: stats_row_level is off
> NOTICE: stats_block_level is off
> NOTICE: trace_notify is off
> NOTICE: hostname_lookup is off
> NOTICE: show_source_port is off
> NOTICE: sql_inheritance is on
> NOTICE: australian_timezones is off
> NOTICE: fixbtree is on
> NOTICE: password_encryption is off
> NOTICE: transform_null_equals is off
> NOTICE: geqo_threshold is 11
> NOTICE: geqo_pool_size is 0
> NOTICE: geqo_effort is 1
> NOTICE: geqo_generations is 0
> NOTICE: geqo_random_seed is -1
> NOTICE: deadlock_timeout is 1000
> NOTICE: syslog is 0
> NOTICE: max_connections is 64
> NOTICE: shared_buffers is 128
> NOTICE: port is 5432
> NOTICE: unix_socket_permissions is 511
> NOTICE: sort_mem is 1024
> NOTICE: vacuum_mem is 8192
> NOTICE: max_files_per_process is 1000
> NOTICE: debug_level is 0
> NOTICE: max_expr_depth is 10000
> NOTICE: max_fsm_relations is 100
> NOTICE: max_fsm_pages is 10000
> NOTICE: max_locks_per_transaction is 64
> NOTICE: authentication_timeout is 60
> NOTICE: pre_auth_delay is 0
> NOTICE: checkpoint_segments is 3
> NOTICE: checkpoint_timeout is 300
> NOTICE: wal_buffers is 8
> NOTICE: wal_files is 0
> NOTICE: wal_debug is 0
> NOTICE: commit_delay is 0
> NOTICE: commit_siblings is 5
> NOTICE: effective_cache_size is 1000
> NOTICE: random_page_cost is 4
> NOTICE: cpu_tuple_cost is 0.01
> NOTICE: cpu_index_tuple_cost is 0.001
> NOTICE: cpu_operator_cost is 0.0025
> NOTICE: geqo_selection_bias is 2
> NOTICE: default_transaction_isolation is read committed
> NOTICE: dynamic_library_path is $libdir
> NOTICE: krb_server_keyfile is FILE:/etc/pgsql/krb5.keytab
> NOTICE: syslog_facility is LOCAL0
> NOTICE: syslog_ident is postgres
> NOTICE: unix_socket_group is unset
> NOTICE: unix_socket_directory is unset
> NOTICE: virtual_host is unset
> NOTICE: wal_sync_method is fdatasync
> NOTICE: DateStyle is ISO with US (NonEuropean) conventions
> NOTICE: Time zone is unset
> NOTICE: TRANSACTION ISOLATION LEVEL is READ COMMITTED
> NOTICE: Current client encoding is 'SQL_ASCII'
> NOTICE: Current server encoding is 'SQL_ASCII'
> NOTICE: Seed for random number generator is unavailable
> SHOW VARIABLE
> project=#
>
> > -----Original Message-----
> > From: pgsql-performance-owner@postgresql.org
> > [mailto:pgsql-performance-owner@postgresql.org]On Behalf Of Justin Clift
> > Sent: Monday, October 07, 2002 2:30 PM
> > To: josh@agliodbs.com
> > Cc: marie.tuite@edisonaffiliates.com; pgsql-performance@postgresql.org
> > Subject: Re: [pgsql-performance] sloooow query
> >
> >
> > Josh Berkus wrote:
> > >
> > > Marie,
> > >
> > > > I am experiencing slow db performance. I have vacuumed,
> > analyzed, reindexed
> > > > using the force option and performance remains the same -
> > dog-slow :( If I
> > > > drop and recreate the database, performance is normal, so
> > this suggests a
> > > > problem with the indexes? I also took a look at the
> > postgresql.conf and all
> > > > appears fine. There are many instances of the same database
> > running on
> > > > different servers and not all servers are experiencing the problem.
> > >
> > > Please post the following:
> > > 1) A copy of the relevant portions of your database schema.
> > > 2) The query that is running slowly.
> > > 3) The results of running EXPLAIN on that query.
> > > 4) Your PostgreSQL version and operating system
> > > 5) Any other relevant information about your databases, such as
> > the quantity
> > > of inserts and deletes on the relevant tables.
> >
> > 6) And the sort_mem, shared_buffers, vacuum_mem, wal_buffers, and
> > wal_files settings from your postgresql.conf file, if possible.
> >
> > :-)
> >
> > Regards and best wishes,
> >
> > Justin Clift
> >
> >
> > > --
> > > -Josh Berkus
> > > Aglio Database Solutions
> > > San Francisco
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 5: Have you checked our extensive FAQ?
> > >
> > > http://www.postgresql.org/users-lounge/docs/faq.html
> >
> > --
> > "My grandfather once told me that there are two kinds of people: those
> > who work and those who take the credit. He told me to try to be in the
> > first group; there was less competition there."
> > - Indira Gandhi
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> >
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
From pgsql-performance-owner@postgresql.org Mon Oct 7 16:32:08 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 179F4475F66
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:32:08 -0400 (EDT)
Received: from edisonaffiliates.com (w205.z208176060.chi-il.dsl.cnc.net
[208.176.60.205])
by postgresql.org (Postfix) with SMTP id 00576476823
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:31:52 -0400 (EDT)
Received: from redhen ([12.32.94.66]) by edisonaffiliates.com ;
Mon, 07 Oct 2002 15:27:03 -0500
Reply-To: <marie.tuite@edisonaffiliates.com>
From: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
To: <josh@agliodbs.com>, <pgsql-performance@postgresql.org>
Subject: Re: sloooow query
Date: Mon, 7 Oct 2002 15:34:11 -0500
Message-ID: <IGELKLINGDMODABPOOFECEBECJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
In-Reply-To: <200210071312.21476.josh@agliodbs.com>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/45
X-Sequence-Number: 62
> What happens if you run VACUUM FULL VERBOSE on the Bad database? Does it
> report lots of rows taken up?
I ran the vacuum for selected tables. It looks fine, I think, but I amn't
always sure what I am reading in output.
project=# vacuum full verbose classes;
NOTICE: --Relation classes--
NOTICE: Pages 5: Changed 0, reaped 2, Empty 0, New 0; Tup 332: Vac 0,
Keep/VTL 0/0, UnUsed 33, MinLen 93, MaxLen 117; Re-using: Free/Avail. Space
3020/2832; EndEmpty/Avail. Pages 0/1.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
NOTICE: Index class_pkey: Pages 5; Tuples 332: Deleted 0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
NOTICE: Rel classes: Pages: 5 --> 5; Tuple(s) moved: 0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
NOTICE: --Relation pg_toast_595650--
NOTICE: Pages 0: Changed 0, reaped 0, Empty 0, New 0; Tup 0: Vac 0,
Keep/VTL 0/0, UnUsed 0, MinLen 0, MaxLen 0; Re-using: Free/Avail. Space 0/0;
EndEmpty/Avail. Pages 0/0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
NOTICE: Index pg_toast_595650_idx: Pages 1; Tuples 0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
VACUUM
project=# vacuum full verbose bm_publications;
NOTICE: --Relation bm_publications--
NOTICE: Pages 2: Changed 0, reaped 1, Empty 0, New 0; Tup 284: Vac 0,
Keep/VTL 0/0, UnUsed 6, MinLen 52, MaxLen 52; Re-using: Free/Avail. Space
416/416; EndEmpty/Avail. Pages 0/2.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
NOTICE: Index bm_publications_pkey: Pages 4; Tuples 284: Deleted 0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
NOTICE: Rel bm_publications: Pages: 2 --> 2; Tuple(s) moved: 0.
CPU 0.00s/0.01u sec elapsed 0.00 sec.
VACUUM
project=# vacuum full verbose user_common;
NOTICE: --Relation user_common--
NOTICE: Pages 21: Changed 0, reaped 19, Empty 0, New 0; Tup 1045: Vac 0,
Keep/VTL 0/0, UnUsed 103, MinLen 117, MaxLen 221; Re-using: Free/Avail.
Space 4080/2968; EndEmpty/Avail. Pages 0/2.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
NOTICE: Index user_common_pkey: Pages 20; Tuples 1045: Deleted 0.
CPU 0.01s/0.00u sec elapsed 0.00 sec.
NOTICE: Rel user_common: Pages: 21 --> 21; Tuple(s) moved: 0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
NOTICE: --Relation pg_toast_474892--
NOTICE: Pages 0: Changed 0, reaped 0, Empty 0, New 0; Tup 0: Vac 0,
Keep/VTL 0/0, UnUsed 0, MinLen 0, MaxLen 0; Re-using: Free/Avail. Space 0/0;
EndEmpty/Avail. Pages 0/0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
NOTICE: Index pg_toast_474892_idx: Pages 1; Tuples 0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
VACUUM
project=# vacuum full verbose bm_subscriptions_rlt;
NOTICE: --Relation bm_subscriptions_rlt--
NOTICE: Pages 1: Changed 0, reaped 1, Empty 0, New 0; Tup 114: Vac 0,
Keep/VTL 0/0, UnUsed 1, MinLen 57, MaxLen 57; Re-using: Free/Avail. Space
872/872; EndEmpty/Avail. Pages 0/1.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
NOTICE: Index bm_subscriptions_rlt_pkey: Pages 2; Tuples 114: Deleted 0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
NOTICE: Rel bm_subscriptions_rlt: Pages: 1 --> 1; Tuple(s) moved: 0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
VACUUM
project=#
From pgsql-performance-owner@postgresql.org Mon Oct 7 16:42:05 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id E4AFE476856
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:42:03 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id EE2E64767C5
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:42:02 -0400 (EDT)
Received: from [66.219.92.2] (HELO chocolate-mousse)
by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP id 1774449; Mon, 07 Oct 2002 13:40:37 -0700
Content-Type: text/plain;
charset="iso-8859-1"
From: Josh Berkus <josh@agliodbs.com>
Reply-To: josh@agliodbs.com
Organization: Aglio Database Solutions
To: <marie.tuite@edisonaffiliates.com>,
<pgsql-performance@postgresql.org>
Subject: Re: sloooow query
Date: Mon, 7 Oct 2002 13:44:31 -0700
X-Mailer: KMail [version 1.4]
References: <IGELKLINGDMODABPOOFECEBECJAA.marie.tuite@edisonaffiliates.com>
In-Reply-To: <IGELKLINGDMODABPOOFECEBECJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210071344.31233.josh@agliodbs.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/46
X-Sequence-Number: 63
Marie,
> I ran the vacuum for selected tables. It looks fine, I think, but I amn't
> always sure what I am reading in output.
So much for the easy answer. The reason I wanted to see a VACUUM FULL is=
=20
that the query on the "bad" database is taking a long time to return even t=
he=20
first row of many of its sub-parts. This is usually the result of not=20
running VACUUM FULL after a lot of deletions.
However, your problem apparently is something else. Is is possible that=
=20
there is some kind of disk access problem for the bad database copy? Is=20
there a difference in where its files are physically located?
--=20
-Josh Berkus
Aglio Database Solutions
San Francisco
From pgsql-performance-owner@postgresql.org Mon Oct 7 16:54:57 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 8BB3D476352; Mon, 7 Oct 2002 16:54:54 -0400 (EDT)
Received: from briar.mmrd.com (unknown [208.255.226.182])
by postgresql.org (Postfix) with ESMTP
id 9E4F047624F; Mon, 7 Oct 2002 16:54:52 -0400 (EDT)
Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100])
by briar.mmrd.com (8.11.2/8.11.2) with ESMTP id g97LqWF18225;
Mon, 7 Oct 2002 17:52:32 -0400
Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55])
by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id g97Ksrx14351;
Mon, 7 Oct 2002 16:54:53 -0400
Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP
(Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id TK2FXNDK; Mon, 7 Oct 2002 16:54:51 -0400
Subject: Re: sloooow query
From: Robert Treat <xzilla@users.sourceforge.net>
To: Justin Clift <justin@postgresql.org>
Cc: marie.tuite@edisonaffiliates.com, josh@agliodbs.com,
pgsql-performance@postgresql.org
In-Reply-To: <3DA1EB67.7D717CB0@postgresql.org>
References: <IGELKLINGDMODABPOOFEEEBCCJAA.marie.tuite@edisonaffiliates.com>
<3DA1EB67.7D717CB0@postgresql.org>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 07 Oct 2002 16:50:27 -0400
Message-Id: <1034023827.3539.99.camel@camel>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/47
X-Sequence-Number: 64
On Mon, 2002-10-07 at 16:15, Justin Clift wrote:
> Hi Marie,
>
> Not sure the wal_files = 0 bit is good either. Haven't seen that set to
> 0 before.
>
This is the default value, and I don't recall anything in the docs that
would suggest to change it. Also IIRC the back end will auto adjust the
# of wal_files as needed in newer versions. Unless your seeing messages
like "DEBUG: XLogWrite: new log file created - consider increasing
WAL_FILES" I think you can leave this alone. Can you point me to
something that says different?
Robert Treat
From pgsql-performance-owner@postgresql.org Mon Oct 7 16:56:45 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 788DF4765E4
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:56:44 -0400 (EDT)
Received: from briar.mmrd.com (unknown [208.255.226.182])
by postgresql.org (Postfix) with ESMTP id 6C41F476076
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:56:41 -0400 (EDT)
Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100])
by briar.mmrd.com (8.11.2/8.11.2) with ESMTP id g97LsLF18426;
Mon, 7 Oct 2002 17:54:21 -0400
Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55])
by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id g97Kugx14400;
Mon, 7 Oct 2002 16:56:42 -0400
Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP
(Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id TK2FXNDX; Mon, 7 Oct 2002 16:56:41 -0400
Subject: Re: sloooow query
From: Robert Treat <xzilla@users.sourceforge.net>
To: marie.tuite@edisonaffiliates.com
Cc: josh@agliodbs.com, pgsql-performance@postgresql.org
In-Reply-To: <IGELKLINGDMODABPOOFECEBECJAA.marie.tuite@edisonaffiliates.com>
References: <IGELKLINGDMODABPOOFECEBECJAA.marie.tuite@edisonaffiliates.com>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 07 Oct 2002 16:52:16 -0400
Message-Id: <1034023937.3539.104.camel@camel>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/48
X-Sequence-Number: 65
On Mon, 2002-10-07 at 16:34, Marie G. Tuite wrote:
> > What happens if you run VACUUM FULL VERBOSE on the Bad database? Does it
> > report lots of rows taken up?
>
> I ran the vacuum for selected tables. It looks fine, I think, but I amn't
> always sure what I am reading in output.
>
Is this vacuum being done on a system that is currently running slow, or
was this system recently dropped/reloaded?
Robert Treat
From pgsql-performance-owner@postgresql.org Mon Oct 7 16:57:49 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 3FA7D476955
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:57:49 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id 5E11647694A
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 16:57:48 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g97KvehR026240;
Mon, 7 Oct 2002 16:57:40 -0400 (EDT)
To: marie.tuite@edisonaffiliates.com
Cc: josh@agliodbs.com, pgsql-performance@postgresql.org
Subject: Re: sloooow query
In-reply-to: <IGELKLINGDMODABPOOFEMEBBCJAA.marie.tuite@edisonaffiliates.com>
References: <IGELKLINGDMODABPOOFEMEBBCJAA.marie.tuite@edisonaffiliates.com>
Comments: In-reply-to "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
message dated "Mon, 07 Oct 2002 14:49:16 -0500"
Date: Mon, 07 Oct 2002 16:57:40 -0400
Message-ID: <26239.1034024260@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/49
X-Sequence-Number: 66
"Marie G. Tuite" <marie.tuite@edisonaffiliates.com> writes:
> I pg_dumped the first database having performance problems and reloaded it
> into a new database on the same server. The query ran normally when I
> reloaded it. There is no difference in hardware, schema or anything else.
Have you done an ANALYZE or VACUUM ANALYZE in either database? The
statistics the planner is working from seem to be quite different
in the two plans.
regards, tom lane
From pgsql-performance-owner@postgresql.org Mon Oct 7 17:01:02 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 37C42476543
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 17:01:02 -0400 (EDT)
Received: from new-smtp2.ihug.com.au (new-smtp2.ihug.com.au [203.109.250.28])
by postgresql.org (Postfix) with ESMTP id 7E0C04764E0
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 17:01:01 -0400 (EDT)
Received: from p393-tnt2.mel.ihug.com.au (postgresql.org) [203.173.165.139]
by new-smtp2.ihug.com.au with esmtp (Exim 3.22 #1 (Debian))
id 17yezr-00068l-00; Tue, 08 Oct 2002 07:01:00 +1000
Message-ID: <3DA1F609.B2570F2F@postgresql.org>
Date: Tue, 08 Oct 2002 07:00:57 +1000
From: Justin Clift <justin@postgresql.org>
X-Mailer: Mozilla 4.79 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Robert Treat <xzilla@users.sourceforge.net>
Cc: marie.tuite@edisonaffiliates.com, josh@agliodbs.com,
pgsql-performance@postgresql.org
Subject: Re: sloooow query
References: <IGELKLINGDMODABPOOFEEEBCCJAA.marie.tuite@edisonaffiliates.com>
<3DA1EB67.7D717CB0@postgresql.org> <1034023827.3539.99.camel@camel>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/50
X-Sequence-Number: 67
Robert Treat wrote:
>
> On Mon, 2002-10-07 at 16:15, Justin Clift wrote:
> > Hi Marie,
> >
> > Not sure the wal_files = 0 bit is good either. Haven't seen that set to
> > 0 before.
> >
>
> This is the default value, and I don't recall anything in the docs that
> would suggest to change it. Also IIRC the back end will auto adjust the
> # of wal_files as needed in newer versions. Unless your seeing messages
> like "DEBUG: XLogWrite: new log file created - consider increasing
> WAL_FILES" I think you can leave this alone. Can you point me to
> something that says different?
Ahh... that makes sense. Have been doing almost nothing else recently
except for setting up new PostgreSQL databases, loading in data, then
doing load testing for things.
Have totally become so used to having wal_files being other than 0 that
it didn't even register that this is the default. ;->
Sorry about that, and thanks for the heads up.
:-)
Regards and best wishes,
Justin Clift
> Robert Treat
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
From pgsql-performance-owner@postgresql.org Mon Oct 7 18:01:52 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 4571D476543
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 18:01:50 -0400 (EDT)
Received: from edisonaffiliates.com (w205.z208176060.phx-az.dsl.cnc.net
[208.176.60.205])
by postgresql.org (Postfix) with SMTP id 2CCC8476237
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 18:01:47 -0400 (EDT)
Received: from redhen ([12.32.94.66]) by edisonaffiliates.com ;
Mon, 07 Oct 2002 16:57:01 -0500
Reply-To: <marie.tuite@edisonaffiliates.com>
From: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: <josh@agliodbs.com>, <pgsql-performance@postgresql.org>
Subject: Re: sloooow query
Date: Mon, 7 Oct 2002 17:04:09 -0500
Message-ID: <IGELKLINGDMODABPOOFEMEBHCJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
In-Reply-To: <26239.1034024260@sss.pgh.pa.us>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/51
X-Sequence-Number: 68
I have analyzed, vacuumed and reindexed.
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Monday, October 07, 2002 3:58 PM
> To: marie.tuite@edisonaffiliates.com
> Cc: josh@agliodbs.com; pgsql-performance@postgresql.org
> Subject: Re: [pgsql-performance] sloooow query
>
>
> "Marie G. Tuite" <marie.tuite@edisonaffiliates.com> writes:
> > I pg_dumped the first database having performance problems and
> reloaded it
> > into a new database on the same server. The query ran normally when I
> > reloaded it. There is no difference in hardware, schema or
> anything else.
>
> Have you done an ANALYZE or VACUUM ANALYZE in either database? The
> statistics the planner is working from seem to be quite different
> in the two plans.
>
> regards, tom lane
>
From pgsql-performance-owner@postgresql.org Mon Oct 7 18:03:49 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 380FA475DD0
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 18:03:49 -0400 (EDT)
Received: from edisonaffiliates.com (w205.z208176060.phx-az.dsl.cnc.net
[208.176.60.205])
by postgresql.org (Postfix) with SMTP id 92829475BD7
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 18:03:48 -0400 (EDT)
Received: from redhen ([12.32.94.66]) by edisonaffiliates.com ;
Mon, 07 Oct 2002 16:57:01 -0500
Reply-To: <marie.tuite@edisonaffiliates.com>
From: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
To: "Robert Treat" <xzilla@users.sourceforge.net>
Cc: <josh@agliodbs.com>, <pgsql-performance@postgresql.org>
Subject: Re: sloooow query
Date: Mon, 7 Oct 2002 17:04:09 -0500
Message-ID: <IGELKLINGDMODABPOOFEIEBHCJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
In-Reply-To: <1034023937.3539.104.camel@camel>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/53
X-Sequence-Number: 70
> Is this vacuum being done on a system that is currently running slow, or
> was this system recently dropped/reloaded?
Currently slow.
From pgsql-performance-owner@postgresql.org Mon Oct 7 18:03:22 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 3DB1E47609B
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 18:03:22 -0400 (EDT)
Received: from edisonaffiliates.com (w205.z208176060.phx-az.dsl.cnc.net
[208.176.60.205])
by postgresql.org (Postfix) with SMTP id 9476C475DAD
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 18:03:21 -0400 (EDT)
Received: from redhen ([12.32.94.66]) by edisonaffiliates.com ;
Mon, 07 Oct 2002 16:58:36 -0500
Reply-To: <marie.tuite@edisonaffiliates.com>
From: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
To: <josh@agliodbs.com>, <pgsql-performance@postgresql.org>
Subject: Re: sloooow query
Date: Mon, 7 Oct 2002 17:05:41 -0500
Message-ID: <IGELKLINGDMODABPOOFEGEBICJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
In-Reply-To: <200210071344.31233.josh@agliodbs.com>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/52
X-Sequence-Number: 69
> However, your problem apparently is something else. Is is possible that
> there is some kind of disk access problem for the bad database copy? Is
> there a difference in where its files are physically located?
Both are in default storage - /var/lib/pgsql/data.
From pgsql-performance-owner@postgresql.org Mon Oct 7 18:07:28 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 0404147683C
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 18:07:27 -0400 (EDT)
Received: from edisonaffiliates.com (w205.z208176060.phx-az.dsl.cnc.net
[208.176.60.205])
by postgresql.org (Postfix) with SMTP id 30174476500
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 18:07:26 -0400 (EDT)
Received: from redhen ([12.32.94.66]) by edisonaffiliates.com ;
Mon, 07 Oct 2002 17:02:38 -0500
Reply-To: <marie.tuite@edisonaffiliates.com>
From: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
To: "Robert Treat" <xzilla@users.sourceforge.net>
Cc: <josh@agliodbs.com>, <pgsql-performance@postgresql.org>
Subject: Re: sloooow query
Date: Mon, 7 Oct 2002 17:09:46 -0500
Message-ID: <IGELKLINGDMODABPOOFEOEBICJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
In-Reply-To: <1034023937.3539.104.camel@camel>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/54
X-Sequence-Number: 71
> Is this vacuum being done on a system that is currently running slow, or
> was this system recently dropped/reloaded?
Currently slow.
From pgsql-performance-owner@postgresql.org Mon Oct 7 18:10:25 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id AADB44761F8
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 18:10:24 -0400 (EDT)
Received: from edisonaffiliates.com (w205.z208176060.phx-az.dsl.cnc.net
[208.176.60.205])
by postgresql.org (Postfix) with SMTP id 84541476048
for <pgsql-performance@postgresql.org>;
Mon, 7 Oct 2002 18:10:22 -0400 (EDT)
Received: from redhen ([12.32.94.66]) by edisonaffiliates.com ;
Mon, 07 Oct 2002 17:05:33 -0500
Reply-To: <marie.tuite@edisonaffiliates.com>
From: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
To: "Pgsql-Performance@Postgresql. Org" <pgsql-performance@postgresql.org>
Subject: Re: sloooow query
Date: Mon, 7 Oct 2002 17:12:41 -0500
Message-ID: <IGELKLINGDMODABPOOFEEEBJCJAA.marie.tuite@edisonaffiliates.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
In-Reply-To: <26239.1034024260@sss.pgh.pa.us>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/55
X-Sequence-Number: 72
> Have you done an ANALYZE or VACUUM ANALYZE in either database? The
> statistics the planner is working from seem to be quite different
> in the two plans.
I have vacuumed, analysed and reindexed.
From pgsql-general-owner@postgresql.org Mon Oct 7 20:03:23 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 9AF96475E77; Mon, 7 Oct 2002 20:03:22 -0400 (EDT)
Received: from svana.org (t1-1-076.dialup.apex.net.au [203.20.62.76])
by postgresql.org (Postfix) with ESMTP
id BF37D475DAD; Mon, 7 Oct 2002 20:03:20 -0400 (EDT)
Received: from kleptog by svana.org with local (Exim 3.35 #1 (Debian))
id 17yhq8-0007cg-00; Tue, 08 Oct 2002 10:03:08 +1000
Date: Tue, 8 Oct 2002 10:03:08 +1000
From: Martijn van Oosterhout <kleptog@svana.org>
To: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
Cc: "Pgsql-General@Postgresql. Org" <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Subject: Re: sloooow query
Message-ID: <20021008000308.GA28930@svana.org>
Reply-To: Martijn van Oosterhout <kleptog@svana.org>
Mail-Followup-To: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>,
"Pgsql-General@Postgresql. Org" <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
References: <IGELKLINGDMODABPOOFEKEAPCJAA.marie.tuite@edisonaffiliates.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <IGELKLINGDMODABPOOFEKEAPCJAA.marie.tuite@edisonaffiliates.com>
User-Agent: Mutt/1.3.28i
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/413
X-Sequence-Number: 31411
On Mon, Oct 07, 2002 at 02:22:09PM -0500, Marie G. Tuite wrote:
> Hello all,
>
> I am experiencing slow db performance. I have vacuumed, analyzed, reindexed
> using the force option and performance remains the same - dog-slow :( If I
> drop and recreate the database, performance is normal, so this suggests a
> problem with the indexes? I also took a look at the postgresql.conf and all
> appears fine. There are many instances of the same database running on
> different servers and not all servers are experiencing the problem.
We need more details if you wish to receive useful answers. Query/EXPLAIN
output/schema, etc
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.
From pgsql-general-owner@postgresql.org Tue Oct 8 01:43:47 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 351144760FA
for <pgsql-general@postgresql.org>;
Tue, 8 Oct 2002 01:43:46 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id 76CB4475EF0
for <pgsql-general@postgresql.org>;
Tue, 8 Oct 2002 01:43:43 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g985jGF22144
for <pgsql-general@postgresql.org>; Tue, 8 Oct 2002 11:15:16 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g985jGv22134;
Tue, 8 Oct 2002 11:15:16 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Date: Tue, 08 Oct 2002 11:14:11 +0530
MIME-Version: 1.0
Subject: Re: [pgsql-performance] Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3DA2BE03.3674.13CF7DD1@localhost>
References: <3DA1E50F.4394.107FF85D@localhost>
In-reply-to: <23897.1034004117@sss.pgh.pa.us>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/418
X-Sequence-Number: 31416
On 7 Oct 2002 at 11:21, Tom Lane wrote:
> "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes:
> > I say if it's a char field, there should be no indicator of length as
> > it's not required. Just store those many characters straight ahead..
>
> Your assumption fails when considering UNICODE or other multibyte
> character encodings.
Correct but is it possible to have real char string when database is not
unicode or when locale defines size of char, to be exact?
In my case varchar does not make sense as all strings are guaranteed to be of
defined length. While the argument you have put is correct, it's causing a disk
space leak, to say so.
Bye
Shridhar
--
Boucher's Observation: He who blows his own horn always plays the music several
octaves higher than originally written.
From pgsql-general-owner@postgresql.org Tue Oct 8 03:21:04 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 21BE5475DAD; Tue, 8 Oct 2002 03:21:01 -0400 (EDT)
Received: from svana.org (t1-1-076.dialup.apex.net.au [203.20.62.76])
by postgresql.org (Postfix) with ESMTP
id 50161475D93; Tue, 8 Oct 2002 03:21:00 -0400 (EDT)
Received: from kleptog by svana.org with local (Exim 3.35 #1 (Debian))
id 17yoff-0000MV-00; Tue, 08 Oct 2002 17:20:47 +1000
Date: Tue, 8 Oct 2002 17:20:47 +1000
From: Martijn van Oosterhout <kleptog@svana.org>
To: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
Cc: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Subject: Re: [pgsql-performance] Large databases, performance
Message-ID: <20021008072047.GB558@svana.org>
Reply-To: Martijn van Oosterhout <kleptog@svana.org>
Mail-Followup-To: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>,
pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
References: <3DA1E50F.4394.107FF85D@localhost>
<3DA2BE03.3674.13CF7DD1@localhost>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3DA2BE03.3674.13CF7DD1@localhost>
User-Agent: Mutt/1.3.28i
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/427
X-Sequence-Number: 31425
On Tue, Oct 08, 2002 at 11:14:11AM +0530, Shridhar Daithankar wrote:
> On 7 Oct 2002 at 11:21, Tom Lane wrote:
>
> > "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes:
> > > I say if it's a char field, there should be no indicator of length as
> > > it's not required. Just store those many characters straight ahead..
> >
> > Your assumption fails when considering UNICODE or other multibyte
> > character encodings.
>
> Correct but is it possible to have real char string when database is not
> unicode or when locale defines size of char, to be exact?
>
> In my case varchar does not make sense as all strings are guaranteed to be of
> defined length. While the argument you have put is correct, it's causing a disk
> space leak, to say so.
Well, maybe. But since 7.1 or so char() and varchar() simply became text
with some length restrictions. This was one of the reasons. It also
simplified a lot of code.
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.
From pgsql-general-owner@postgresql.org Tue Oct 8 09:33:56 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 34D0C476993
for <pgsql-general@postgresql.org>;
Tue, 8 Oct 2002 09:33:54 -0400 (EDT)
Received: from smtp014.mail.yahoo.com (smtp014.mail.yahoo.com
[216.136.173.58])
by postgresql.org (Postfix) with SMTP id 69EC3476117
for <pgsql-general@postgresql.org>;
Tue, 8 Oct 2002 09:33:03 -0400 (EDT)
Received: from psc.progress.com (HELO Yahoo.com) (janwieck@192.233.92.200 with
plain)
by smtp.mail.vip.sc5.yahoo.com with SMTP; 8 Oct 2002 13:32:55 -0000
Message-ID: <3DA2DE82.1AC84934@Yahoo.com>
Date: Tue, 08 Oct 2002 09:32:50 -0400
From: Jan Wieck <JanWieck@Yahoo.com>
Organization: Home
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en,ru
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Blood <david@matraex.com>, pgsql-general@postgresql.org
Subject: Re: Pinning a table into memory
References: <03a301c26bc5$a799a970$1f00a8c0@redwood>
<25545.1033757267@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/445
X-Sequence-Number: 31443
Tom Lane wrote:
>
> "David Blood" <david@matraex.com> writes:
> > In Oracle you can Pin large objects into memory to prevent frequent
> > reloads. Is there anyway to do this with Postgres?
>
> I can never understand why people think this would be a good idea.
> If you're hitting a table frequently, it will stay in memory anyway
> (either in Postgres shared buffers or kernel disk cache). If you're
> not hitting it frequently enough to keep it swapped in, then whatever
> is getting swapped in instead is probably a better candidate to be
> occupying the space.
As I understand it, he's looking for a mechanism to prevent a single
sequential scan on a table, larger than the buffer cache, to kick out
everything else at once. But I agree with you that pinning other objects
is just mucking with the symptoms instead of curing the desease.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #
From pgsql-performance-owner@postgresql.org Tue Oct 8 09:53:18 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 2575C476E64
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 09:53:16 -0400 (EDT)
Received: from lakemtao04.cox.net (lakemtao04.cox.net [68.1.17.241])
by postgresql.org (Postfix) with ESMTP id 1078747651A
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 09:51:07 -0400 (EDT)
Received: from localhost.localdomain ([68.11.66.83]) by lakemtao04.cox.net
(InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP
id <20021008135106.FWLY1315.lakemtao04.cox.net@localhost.localdomain>
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 09:51:06 -0400
Subject: Re: [GENERAL] Large databases, performance
From: Ron Johnson <ron.l.johnson@cox.net>
To: pgsql-performance@postgresql.org
In-Reply-To: <20021008072047.GB558@svana.org>
References: <3DA1E50F.4394.107FF85D@localhost>
<3DA2BE03.3674.13CF7DD1@localhost> <20021008072047.GB558@svana.org>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 08 Oct 2002 08:50:52 -0500
Message-Id: <1034085052.1094.14.camel@haggis>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/59
X-Sequence-Number: 76
On Tue, 2002-10-08 at 02:20, Martijn van Oosterhout wrote:
> On Tue, Oct 08, 2002 at 11:14:11AM +0530, Shridhar Daithankar wrote:
> > On 7 Oct 2002 at 11:21, Tom Lane wrote:
> >
> > > "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes:
> > > > I say if it's a char field, there should be no indicator of length as
> > > > it's not required. Just store those many characters straight ahead..
> > >
> > > Your assumption fails when considering UNICODE or other multibyte
> > > character encodings.
> >
> > Correct but is it possible to have real char string when database is not
> > unicode or when locale defines size of char, to be exact?
> >
> > In my case varchar does not make sense as all strings are guaranteed to be of
> > defined length. While the argument you have put is correct, it's causing a disk
> > space leak, to say so.
Not only that, but you get INSERT, UPDATE, DELETE and SELECT performance
gains with fixed length records, since you don't get fragmentation.
For example:
TABLE T
F1 INTEGER;
F2 VARCHAR(200)
INSERT INTO T VALUES (1, 'FOO BAR');
INSERT INTO T VALUES (2, 'SNAFU');
Next,
UPDATE T SET F2 = 'WIGGLE WAGGLE WUMPERSTUMPER' WHERE F1 = 1;
Unless there is a big gap on disk between the 2 inserted records,
postgresql must then look somewhere else for space to put the new
version of T WHERE F1 = 1.
With fixed-length records, you know exactly where you can put the
new value of F2, thus minimizing IO.
> Well, maybe. But since 7.1 or so char() and varchar() simply became text
> with some length restrictions. This was one of the reasons. It also
> simplified a lot of code.
How much simpler can you get than fixed-length records?
Of course, then there are 2 code paths, 1 for fixed length, and
1 for variable length.
--
+------------------------------------------------------------+
| Ron Johnson, Jr. mailto:ron.l.johnson@cox.net |
| Jefferson, LA USA http://members.cox.net/ron.l.johnson |
| |
| "they love our milk and honey, but preach about another |
| way of living" |
| Merle Haggard, "The Fighting Side Of Me" |
+------------------------------------------------------------+
From pgsql-performance-owner@postgresql.org Tue Oct 8 10:38:00 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id D658F4760AA
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 10:37:59 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id 14D70475BD7
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 10:37:59 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g98Ec2hR001929;
Tue, 8 Oct 2002 10:38:02 -0400 (EDT)
To: Ron Johnson <ron.l.johnson@cox.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: [GENERAL] Large databases, performance
In-reply-to: <1034085052.1094.14.camel@haggis>
References: <3DA1E50F.4394.107FF85D@localhost>
<3DA2BE03.3674.13CF7DD1@localhost> <20021008072047.GB558@svana.org>
<1034085052.1094.14.camel@haggis>
Comments: In-reply-to Ron Johnson <ron.l.johnson@cox.net>
message dated "08 Oct 2002 08:50:52 -0500"
Date: Tue, 08 Oct 2002 10:38:02 -0400
Message-ID: <1928.1034087882@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/60
X-Sequence-Number: 77
Ron Johnson <ron.l.johnson@cox.net> writes:
> Not only that, but you get INSERT, UPDATE, DELETE and SELECT performance
> gains with fixed length records, since you don't get fragmentation.
That argument loses a lot of its force when you consider that Postgres
uses non-overwriting storage management. We never do an UPDATE in-place
anyway, and so it matters little whether the updated record is the same
size as the original.
>> Well, maybe. But since 7.1 or so char() and varchar() simply became text
>> with some length restrictions. This was one of the reasons. It also
>> simplified a lot of code.
> How much simpler can you get than fixed-length records?
It's not simpler: it's more complicated, because you need an additional
input item to figure out the size of any given column in a record.
Making sure that that info is available every place it's needed is one
of the costs of supporting a feature like this.
regards, tom lane
From pgsql-performance-owner@postgresql.org Tue Oct 8 10:41:20 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id D1577476950
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 10:41:19 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id B1881476992
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 10:41:14 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g98EgrE13773
for <pgsql-performance@postgresql.org>; Tue, 8 Oct 2002 20:12:53 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g98Egrv13768
for <pgsql-performance@postgresql.org>; Tue, 8 Oct 2002 20:12:53 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-performance@postgresql.org
Date: Tue, 08 Oct 2002 20:11:47 +0530
MIME-Version: 1.0
Subject: Re: [GENERAL] Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3DA33C03.31407.15BBAE9C@localhost>
References: <1034085052.1094.14.camel@haggis>
In-reply-to: <1928.1034087882@sss.pgh.pa.us>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/61
X-Sequence-Number: 78
On 8 Oct 2002 at 10:38, Tom Lane wrote:
> Ron Johnson <ron.l.johnson@cox.net> writes:
> It's not simpler: it's more complicated, because you need an additional
> input item to figure out the size of any given column in a record.
> Making sure that that info is available every place it's needed is one
> of the costs of supporting a feature like this.
I understand. Can we put this in say page header instead of tuple header. While
all the arguments you have put are really good, the stellar redundancy
certainly can do with a mid-way solution.
Just a thought..
Bye
Shridhar
--
bit, n: A unit of measure applied to color. Twenty-four-bit color refers to
expensive $3 color as opposed to the cheaper 25 cent, or two-bit, color that
use to be available a few years ago.
From pgsql-performance-owner@postgresql.org Tue Oct 8 11:17:06 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 410DA475F84
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 11:17:05 -0400 (EDT)
Received: from lakemtao01.cox.net (lakemtao01.cox.net [68.1.17.244])
by postgresql.org (Postfix) with ESMTP id 95A27475F32
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 11:17:04 -0400 (EDT)
Received: from localhost.localdomain ([68.11.66.83]) by lakemtao01.cox.net
(InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP
id <20021008151709.OQAG1310.lakemtao01.cox.net@localhost.localdomain>
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 11:17:09 -0400
Subject: Re: [GENERAL] Large databases, performance
From: Ron Johnson <ron.l.johnson@cox.net>
To: pgsql-performance@postgresql.org
In-Reply-To: <1928.1034087882@sss.pgh.pa.us>
References: <3DA1E50F.4394.107FF85D@localhost>
<3DA2BE03.3674.13CF7DD1@localhost> <20021008072047.GB558@svana.org>
<1034085052.1094.14.camel@haggis> <1928.1034087882@sss.pgh.pa.us>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 08 Oct 2002 10:16:55 -0500
Message-Id: <1034090215.1094.42.camel@haggis>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/62
X-Sequence-Number: 79
On Tue, 2002-10-08 at 09:38, Tom Lane wrote:
> Ron Johnson <ron.l.johnson@cox.net> writes:
> > Not only that, but you get INSERT, UPDATE, DELETE and SELECT performance
> > gains with fixed length records, since you don't get fragmentation.
>
> That argument loses a lot of its force when you consider that Postgres
> uses non-overwriting storage management. We never do an UPDATE in-place
> anyway, and so it matters little whether the updated record is the same
> size as the original.
Must you update any relative indexes, in order to point to the
new location of the record?
> >> Well, maybe. But since 7.1 or so char() and varchar() simply became text
> >> with some length restrictions. This was one of the reasons. It also
> >> simplified a lot of code.
>
> > How much simpler can you get than fixed-length records?
>
> It's not simpler: it's more complicated, because you need an additional
> input item to figure out the size of any given column in a record.
With fixed-length, why? From the metadata, you can compute the intra-
record offsets. That's how it works with the commercial RDBMS that
I use at work.
On that system, even variable-length records don't need record-size
fields. Any repeating text (more that ~4 chars) is replaced with
run-length encoding. This includes the phantom spaces at the end
of the field.
> Making sure that that info is available every place it's needed is one
> of the costs of supporting a feature like this.
--
+------------------------------------------------------------+
| Ron Johnson, Jr. mailto:ron.l.johnson@cox.net |
| Jefferson, LA USA http://members.cox.net/ron.l.johnson |
| |
| "they love our milk and honey, but preach about another |
| way of living" |
| Merle Haggard, "The Fighting Side Of Me" |
+------------------------------------------------------------+
From pgsql-performance-owner@postgresql.org Tue Oct 8 11:35:12 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 58BB9476773
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 11:35:11 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id B7D584766E6
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 11:35:10 -0400 (EDT)
Received: from [63.195.55.98] (account <josh@agliodbs.com>)
by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9)
with HTTP id 1775407; Tue, 08 Oct 2002 08:33:53 -0700
From: "Josh Berkus" <josh@agliodbs.com>
Subject: Re: CHAR, VARCHAR, TEXT (Was Large Databases)
To: Ron Johnson <ron.l.johnson@cox.net>,
pgsql-performance@postgresql.org
X-Mailer: CommuniGate Pro Web Mailer v.3.5.9
Date: Tue, 08 Oct 2002 08:33:53 -0700
Message-ID: <web-1775407@davinci.ethosmedia.com>
In-Reply-To: <1034090215.1094.42.camel@haggis>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/63
X-Sequence-Number: 80
Ron, Shridhar,
Maybe I missed something on this thread, but can either of you give me
an example of a real database where the PostgreSQL approach of "all
strings are TEXT" versus the more traditional CHAR implementation have
resulted in measurable performance loss?
Otherwise, this discussion is rather academic ...
-Josh Berkus
From pgsql-performance-owner@postgresql.org Tue Oct 8 11:51:10 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id CD04C47627C
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 11:51:08 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id 218004761C2
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 11:51:08 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g98FpChR002503;
Tue, 8 Oct 2002 11:51:12 -0400 (EDT)
To: Ron Johnson <ron.l.johnson@cox.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: [GENERAL] Large databases, performance
In-reply-to: <1034090215.1094.42.camel@haggis>
References: <3DA1E50F.4394.107FF85D@localhost>
<3DA2BE03.3674.13CF7DD1@localhost> <20021008072047.GB558@svana.org>
<1034085052.1094.14.camel@haggis> <1928.1034087882@sss.pgh.pa.us>
<1034090215.1094.42.camel@haggis>
Comments: In-reply-to Ron Johnson <ron.l.johnson@cox.net>
message dated "08 Oct 2002 10:16:55 -0500"
Date: Tue, 08 Oct 2002 11:51:12 -0400
Message-ID: <2502.1034092272@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/64
X-Sequence-Number: 81
Ron Johnson <ron.l.johnson@cox.net> writes:
> On Tue, 2002-10-08 at 09:38, Tom Lane wrote:
>> That argument loses a lot of its force when you consider that Postgres
>> uses non-overwriting storage management. We never do an UPDATE in-place
>> anyway, and so it matters little whether the updated record is the same
>> size as the original.
> Must you update any relative indexes, in order to point to the
> new location of the record?
We make new index entries for the new record, yes. Both the old and new
records must be indexed (until one or the other is garbage-collected by
VACUUM) so that transactions can find whichever version they are
supposed to be able to see according to the tuple visibility rules.
>> It's not simpler: it's more complicated, because you need an additional
>> input item to figure out the size of any given column in a record.
> With fixed-length, why? From the metadata, you can compute the intra-
> record offsets.
Sure, but you need an additional item of metadata than you otherwise
would (this is atttypmod, in Postgres terms). I'm not certain that the
typmod is available everyplace that would need to be able to figure out
the physical width of a column.
> On that system, even variable-length records don't need record-size
> fields. Any repeating text (more that ~4 chars) is replaced with
> run-length encoding. This includes the phantom spaces at the end
> of the field.
Interesting that you should bring that up in the context of an argument
for supporting fixed-width fields ;-). Doesn't any form of data
compression bring you right back into variable-width land?
Postgres' approach to data compression is that it's done per-field,
and only on variable-width fields. We steal a couple of bits from the
length word to allow flagging of compressed and out-of-line values.
If we were to make CHAR(n) fixed-width then it would lose the ability
to participate in either compression or out-of-line storage.
Between that and the multibyte-encoding issue, I think it's very
difficult to make a case that the general-purpose CHAR(n) type should
be implemented as fixed-width. If someone has a specialized application
where they need a restricted fixed-width string type, it's not that
hard to make a user-defined type that supports only a single column
width (and thereby gets around the typmod issue). So I'm satisfied with
saying "define your own type if you want this".
regards, tom lane
From pgsql-performance-owner@postgresql.org Tue Oct 8 13:42:36 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 98F67475AFA
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 13:42:35 -0400 (EDT)
Received: from lakemtao02.cox.net (lakemtao02.cox.net [68.1.17.243])
by postgresql.org (Postfix) with ESMTP id 0B5DE4759BD
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 13:42:35 -0400 (EDT)
Received: from localhost.localdomain ([68.11.66.83]) by lakemtao02.cox.net
(InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP
id <20021008174235.DSTC12192.lakemtao02.cox.net@localhost.localdomain>
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 13:42:35 -0400
Subject: Re: CHAR, VARCHAR, TEXT (Was Large Databases)
From: Ron Johnson <ron.l.johnson@cox.net>
To: pgsql-performance@postgresql.org
In-Reply-To: <web-1775407@davinci.ethosmedia.com>
References: <web-1775407@davinci.ethosmedia.com>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 08 Oct 2002 12:42:20 -0500
Message-Id: <1034098940.1336.39.camel@haggis>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/65
X-Sequence-Number: 82
On Tue, 2002-10-08 at 10:33, Josh Berkus wrote:
> Ron, Shridhar,
>
> Maybe I missed something on this thread, but can either of you give me
> an example of a real database where the PostgreSQL approach of "all
> strings are TEXT" versus the more traditional CHAR implementation have
> resulted in measurable performance loss?
??????
> Otherwise, this discussion is rather academic ...
--
+------------------------------------------------------------+
| Ron Johnson, Jr. mailto:ron.l.johnson@cox.net |
| Jefferson, LA USA http://members.cox.net/ron.l.johnson |
| |
| "they love our milk and honey, but preach about another |
| way of living" |
| Merle Haggard, "The Fighting Side Of Me" |
+------------------------------------------------------------+
From pgsql-performance-owner@postgresql.org Tue Oct 8 18:45:36 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 60DEC4760FA
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 18:45:35 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id B3852475F82
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 18:45:34 -0400 (EDT)
Received: from [216.135.165.74] (HELO lazarus)
by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP-TLS id 1776173; Tue, 08 Oct 2002 15:44:16 -0700
Content-Type: text/plain;
charset="iso-8859-1"
From: Josh Berkus <josh@agliodbs.com>
Organization: Aglio Database Solutions
To: Ron Johnson <ron.l.johnson@cox.net>,
pgsql-performance@postgresql.org
Subject: Re: CHAR, VARCHAR, TEXT (Was Large Databases)
Date: Tue, 8 Oct 2002 15:44:36 -0700
X-Mailer: KMail [version 1.4]
References: <web-1775407@davinci.ethosmedia.com>
<1034098940.1336.39.camel@haggis>
In-Reply-To: <1034098940.1336.39.camel@haggis>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210081544.36139.josh@agliodbs.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/66
X-Sequence-Number: 83
Ron,
> > Maybe I missed something on this thread, but can either of you give me
> > an example of a real database where the PostgreSQL approach of "all
> > strings are TEXT" versus the more traditional CHAR implementation have
> > resulted in measurable performance loss?
>
> ??????
In other words, if it ain't broke, don't fix it.
--=20
Josh Berkus
josh@agliodbs.com
Aglio Database Solutions
San Francisco
From pgsql-general-owner@postgresql.org Tue Oct 8 19:00:32 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 4ABB1476390; Tue, 8 Oct 2002 19:00:23 -0400 (EDT)
Received: from svana.org (t1-1-076.dialup.apex.net.au [203.20.62.76])
by postgresql.org (Postfix) with ESMTP
id E5DDC47627C; Tue, 8 Oct 2002 19:00:21 -0400 (EDT)
Received: from kleptog by svana.org with local (Exim 3.35 #1 (Debian))
id 17z3C3-0002Gs-00; Wed, 09 Oct 2002 08:51:11 +1000
Date: Wed, 9 Oct 2002 08:51:11 +1000
From: Martijn van Oosterhout <kleptog@svana.org>
To: Zeugswetter Andreas SB SD <ZeugswetterA@spardat.at>
Cc: Manfred Koizar <mkoi-pg@aon.at>,
shridhar_daithankar@persistent.co.in, pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Subject: Re: [HACKERS] Large databases, performance
Message-ID: <20021008225111.GA8663@svana.org>
Reply-To: Martijn van Oosterhout <kleptog@svana.org>
Mail-Followup-To: Zeugswetter Andreas SB SD <ZeugswetterA@spardat.at>,
Manfred Koizar <mkoi-pg@aon.at>,
shridhar_daithankar@persistent.co.in, pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
References: <46C15C39FEB2C44BA555E356FBCD6FA4887A5A@m0114.s-mxs.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <46C15C39FEB2C44BA555E356FBCD6FA4887A5A@m0114.s-mxs.net>
User-Agent: Mutt/1.3.28i
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/473
X-Sequence-Number: 31471
On Mon, Oct 07, 2002 at 05:42:12PM +0200, Zeugswetter Andreas SB SD wrote:
> > Hackers, do you think it's possible to hack together a quick and dirty
> > patch, so that string length is represented by one byte? IOW can a
> > database be built that doesn't contain any char/varchar/text value
> > longer than 255 characters in the catalog?
>
> Since he is only using fixchar how about doing a fixchar implemetation, that
> does not store length at all ? It is the same for every row anyways !
Remember that in Unicode, 1 char != 1 byte. In fact, any encoding that's not
Latin will have a problem. I guess you could put a warning on it: not for
use for asian character sets. So what do you do if someone tries to insert
such a string anyway?
Perhaps a better approach is to vary the number of bytes used for the
length. So one byte for lengths < 64, two bytes for lengths < 16384.
Unfortunatly, two bits in the length are already used (IIRC) for other
things making it a bit more tricky.
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.
From pgsql-performance-owner@postgresql.org Tue Oct 8 19:37:42 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 1477F475B33
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 19:37:40 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 1E8C3476541
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 19:37:39 -0400 (EDT)
Received: from [216.135.165.74] (HELO lazarus)
by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP-TLS id 1776247; Tue, 08 Oct 2002 16:36:21 -0700
Content-Type: text/plain;
charset="iso-8859-1"
From: Josh Berkus <josh@agliodbs.com>
Organization: Aglio Database Solutions
To: Ron Johnson <ron.l.johnson@cox.net>,
pgsql-performance@postgresql.org
Subject: Re: CHAR, VARCHAR, TEXT (Was Large Databases)
Date: Tue, 8 Oct 2002 16:36:40 -0700
X-Mailer: KMail [version 1.4]
References: <web-1775407@davinci.ethosmedia.com>
<200210081544.36139.josh@agliodbs.com>
<1034119771.1365.154.camel@haggis>
In-Reply-To: <1034119771.1365.154.camel@haggis>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210081636.40713.josh@agliodbs.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/68
X-Sequence-Number: 85
Ron,
> > > > Maybe I missed something on this thread, but can either of you give
> > > > me an example of a real database where the PostgreSQL approach of
> > > > "all strings are TEXT" versus the more traditional CHAR
> > > > implementation have resulted in measurable performance loss?
> > >
> > > ??????
> >
> > In other words, if it ain't broke, don't fix it.
>
> Well, does Really Slow Performance qualify as "broke"?
That's what I was asking. Can you explain where your slow performance is=
=20
attibutable to the CHAR implementation issues? I missed that, if it was=
=20
explained earlier in the thread.
--=20
Josh Berkus
josh@agliodbs.com
Aglio Database Solutions
San Francisco
From pgsql-performance-owner@postgresql.org Tue Oct 8 23:47:28 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 9173B475FC5
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 23:47:26 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id F320A475FB8
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 23:47:25 -0400 (EDT)
Received: from [63.195.55.98] (account <josh@agliodbs.com>)
by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9)
with HTTP id 1776486 for <pgsql-performance@postgresql.org>;
Tue, 08 Oct 2002 20:46:12 -0700
From: "Josh Berkus" <josh@agliodbs.com>
Subject: What does this tell me?
To: pgsql-performance@postgresql.org
X-Mailer: CommuniGate Pro Web Mailer v.3.5.9
Date: Tue, 08 Oct 2002 20:46:12 -0700
Message-ID: <web-1776486@davinci.ethosmedia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/69
X-Sequence-Number: 86
Folks,
I'm still having trouble with my massive data transformation procedures
taking forever to finish. Particularly, many of them will get about
1/2 way through, and then I will start seeing this in the log:
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000E4
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000E5
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000E6
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000E7
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000E8
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000E9
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000EA
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000EB
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000EC
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000ED
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000EE
2002-10-08 20:37:13 DEBUG: recycled transaction log file
0000000A000000EF
2002-10-08 20:37:13 DEBUG: reaping dead processes
2002-10-08 20:37:13 DEBUG: child process (pid 15270) exited with exit
code 0
... repeat ad nauseum. The problem is, each "recycle transaction log
... reaping dead child process" cycle takes about 4-7 minutes ...
meaning that the procedure can take up to 1/2 hour to finish, and
sometimes not finish at all.
Obviously, the system is telling me that it is running out of resources
somehow. But I'm at my wit's end to figure out what resources,
exactly. Suggestions?
-Josh Berkus
From pgsql-performance-owner@postgresql.org Tue Oct 8 23:49:46 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 4EE2D475E40
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 23:49:45 -0400 (EDT)
Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251])
by postgresql.org (Postfix) with ESMTP id 60949475DAD
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 23:49:43 -0400 (EDT)
Received: (from pgman@localhost)
by candle.pha.pa.us (8.11.6/8.10.1) id g993nab27932;
Tue, 8 Oct 2002 23:49:36 -0400 (EDT)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200210090349.g993nab27932@candle.pha.pa.us>
Subject: Re: What does this tell me?
In-Reply-To: <web-1776486@davinci.ethosmedia.com>
To: Josh Berkus <josh@agliodbs.com>
Date: Tue, 8 Oct 2002 23:49:36 -0400 (EDT)
Cc: pgsql-performance@postgresql.org
X-Mailer: ELM [version 2.4ME+ PL99 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/70
X-Sequence-Number: 87
I think all it means is that is doesn't need some of the pg_clog files
and is reusing them, basically meaning you are pushing through lots of
transactions. I don't see it as a problem.
---------------------------------------------------------------------------
Josh Berkus wrote:
> Folks,
>
> I'm still having trouble with my massive data transformation procedures
> taking forever to finish. Particularly, many of them will get about
> 1/2 way through, and then I will start seeing this in the log:
>
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E4
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E5
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E6
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E7
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E8
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E9
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000EA
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000EB
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000EC
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000ED
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000EE
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000EF
> 2002-10-08 20:37:13 DEBUG: reaping dead processes
> 2002-10-08 20:37:13 DEBUG: child process (pid 15270) exited with exit
> code 0
>
> ... repeat ad nauseum. The problem is, each "recycle transaction log
> ... reaping dead child process" cycle takes about 4-7 minutes ...
> meaning that the procedure can take up to 1/2 hour to finish, and
> sometimes not finish at all.
>
> Obviously, the system is telling me that it is running out of resources
> somehow. But I'm at my wit's end to figure out what resources,
> exactly. Suggestions?
>
> -Josh Berkus
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From pgsql-performance-owner@postgresql.org Tue Oct 8 23:50:50 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id DB191475E60
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 23:50:49 -0400 (EDT)
Received: from mailhost.nxad.com (lan.ext.nxad.com [66.250.180.254])
by postgresql.org (Postfix) with ESMTP id 4D1FD475B33
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 23:50:49 -0400 (EDT)
Received: from perrin.int.nxad.com (perrin.int.nxad.com [192.168.1.251])
by mailhost.nxad.com (Postfix) with ESMTP
id 4C618212E00; Tue, 8 Oct 2002 20:50:44 -0700 (PDT)
Received: by perrin.int.nxad.com (Postfix, from userid 1001)
id AB90520F02; Tue, 8 Oct 2002 20:50:43 -0700 (PDT)
Date: Tue, 8 Oct 2002 20:50:43 -0700
From: Sean Chittenden <sean@chittenden.org>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: What does this tell me?
Message-ID: <20021009035043.GC34365@perrin.int.nxad.com>
References: <web-1776486@davinci.ethosmedia.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <web-1776486@davinci.ethosmedia.com>
User-Agent: Mutt/1.4i
X-PGP-Key: finger seanc@FreeBSD.org
X-PGP-Fingerprint: 6CEB 1B06 BFD3 70F6 95BE 7E4D 8E85 2E0A 5F5B 3ECB
X-Web-Homepage: http://sean.chittenden.org/
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/71
X-Sequence-Number: 88
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E4
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E5
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E6
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E7
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E8
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000E9
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000EA
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000EB
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000EC
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000ED
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000EE
> 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> 0000000A000000EF
> 2002-10-08 20:37:13 DEBUG: reaping dead processes
> 2002-10-08 20:37:13 DEBUG: child process (pid 15270) exited with exit
> code 0
>
> ... repeat ad nauseum. The problem is, each "recycle transaction
> log ... reaping dead child process" cycle takes about 4-7 minutes
> ... meaning that the procedure can take up to 1/2 hour to finish,
> and sometimes not finish at all.
>
> Obviously, the system is telling me that it is running out of
> resources somehow. But I'm at my wit's end to figure out what
> resources, exactly. Suggestions?
You're running out of WAL log space, iirc. Increase the number of WAL
logs available and you should be okay. If you're experiencing this
halfway through, I'd increase the size by 50%, say maybe 60-70% for
good measure. -sc
--
Sean Chittenden
From pgsql-performance-owner@postgresql.org Tue Oct 8 23:55:37 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 250B64761BF
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 23:55:37 -0400 (EDT)
Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251])
by postgresql.org (Postfix) with ESMTP id 31650476154
for <pgsql-performance@postgresql.org>;
Tue, 8 Oct 2002 23:55:35 -0400 (EDT)
Received: (from pgman@localhost)
by candle.pha.pa.us (8.11.6/8.10.1) id g993tAU02565;
Tue, 8 Oct 2002 23:55:10 -0400 (EDT)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200210090355.g993tAU02565@candle.pha.pa.us>
Subject: Re: What does this tell me?
In-Reply-To: <20021009035043.GC34365@perrin.int.nxad.com>
To: Sean Chittenden <sean@chittenden.org>
Date: Tue, 8 Oct 2002 23:55:10 -0400 (EDT)
Cc: Josh Berkus <josh@agliodbs.com>, pgsql-performance@postgresql.org
X-Mailer: ELM [version 2.4ME+ PL99 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/72
X-Sequence-Number: 89
Sean Chittenden wrote:
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000E4
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000E5
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000E6
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000E7
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000E8
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000E9
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000EA
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000EB
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000EC
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000ED
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000EE
> > 2002-10-08 20:37:13 DEBUG: recycled transaction log file
> > 0000000A000000EF
> > 2002-10-08 20:37:13 DEBUG: reaping dead processes
> > 2002-10-08 20:37:13 DEBUG: child process (pid 15270) exited with exit
> > code 0
> >
> > ... repeat ad nauseum. The problem is, each "recycle transaction
> > log ... reaping dead child process" cycle takes about 4-7 minutes
> > ... meaning that the procedure can take up to 1/2 hour to finish,
> > and sometimes not finish at all.
> >
> > Obviously, the system is telling me that it is running out of
> > resources somehow. But I'm at my wit's end to figure out what
> > resources, exactly. Suggestions?
>
> You're running out of WAL log space, iirc. Increase the number of WAL
> logs available and you should be okay. If you're experiencing this
> halfway through, I'd increase the size by 50%, say maybe 60-70% for
> good measure. -sc
Oh, yes, you are right. My hardware tuning guide mentions it. Strange
it is called the transaction log file:
http://www.ca.postgresql.org/docs/momjian/hw_performance/
Unless you are seeing this more freqently than every minute, it should
be fine.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From pgsql-performance-owner@postgresql.org Wed Oct 9 00:03:15 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 0891C476224
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:03:14 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 69F024761F8
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:03:13 -0400 (EDT)
Received: from [63.195.55.98] (account <josh@agliodbs.com>)
by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9)
with HTTP id 1776515; Tue, 08 Oct 2002 21:01:58 -0700
From: "Josh Berkus" <josh@agliodbs.com>
Subject: Re: What does this tell me?
To: Bruce Momjian <pgman@candle.pha.pa.us>,
Sean Chittenden <sean@chittenden.org>
Cc: Josh Berkus <josh@agliodbs.com>, pgsql-performance@postgresql.org
X-Mailer: CommuniGate Pro Web Mailer v.3.5.9
Date: Tue, 08 Oct 2002 21:01:58 -0700
Message-ID: <web-1776515@davinci.ethosmedia.com>
In-Reply-To: <200210090355.g993tAU02565@candle.pha.pa.us>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/73
X-Sequence-Number: 90
Bruce, Sean,
> Oh, yes, you are right. My hardware tuning guide mentions it.
> Strange
> it is called the transaction log file:
>
> http://www.ca.postgresql.org/docs/momjian/hw_performance/
>
> Unless you are seeing this more freqently than every minute, it
> should
> be fine.
Actually, it's apparently a real problem, because the function never
completes. Each cycle of "recycling transaction logs" takes longer
and longer, and eventually locks up completely.
What the function is doing is a succession of data cleanup procedures,
updating the same table about 50 times. I will be very thankful for
the day when I can commit within a procedure.
Unfortunately, I am already at the maximum number of WAL files (64).
What do I do now?
-Josh Berkus
From pgsql-performance-owner@postgresql.org Wed Oct 9 00:07:33 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 1705D475FC5
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:07:32 -0400 (EDT)
Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251])
by postgresql.org (Postfix) with ESMTP id 07AD9475AD7
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:07:30 -0400 (EDT)
Received: (from pgman@localhost)
by candle.pha.pa.us (8.11.6/8.10.1) id g9947O904553;
Wed, 9 Oct 2002 00:07:24 -0400 (EDT)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200210090407.g9947O904553@candle.pha.pa.us>
Subject: Re: What does this tell me?
In-Reply-To: <web-1776515@davinci.ethosmedia.com>
To: Josh Berkus <josh@agliodbs.com>
Date: Wed, 9 Oct 2002 00:07:24 -0400 (EDT)
Cc: Sean Chittenden <sean@chittenden.org>,
pgsql-performance@postgresql.org
X-Mailer: ELM [version 2.4ME+ PL99 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/74
X-Sequence-Number: 91
Josh Berkus wrote:
> Bruce, Sean,
>
> > Oh, yes, you are right. My hardware tuning guide mentions it.
> > Strange
> > it is called the transaction log file:
> >
> > http://www.ca.postgresql.org/docs/momjian/hw_performance/
> >
> > Unless you are seeing this more freqently than every minute, it
> > should
> > be fine.
>
> Actually, it's apparently a real problem, because the function never
> completes. Each cycle of "recycling transaction logs" takes longer
> and longer, and eventually locks up completely.
>
> What the function is doing is a succession of data cleanup procedures,
> updating the same table about 50 times. I will be very thankful for
> the day when I can commit within a procedure.
>
> Unfortunately, I am already at the maximum number of WAL files (64).
> What do I do now?
Wow, that is interesting. I thought one big transaction wouldn't lock
up the WAL records. I figured there would be a CHECKPOINT, and then the
WAL records could be recycled, even though the transaction is still
open.
Where do you see 64 as the maximum number of WAL segments. What is your
checkpoint_segments value? The actual number of files shouldn't be much
more than twice that value. What PostgreSQL version are you using?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From pgsql-performance-owner@postgresql.org Wed Oct 9 00:17:48 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 5ACD1475D12
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:17:47 -0400 (EDT)
Received: from mailhost.nxad.com (lan.ext.nxad.com [66.250.180.254])
by postgresql.org (Postfix) with ESMTP id D9C50474E5C
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:17:46 -0400 (EDT)
Received: from perrin.int.nxad.com (perrin.int.nxad.com [192.168.1.251])
by mailhost.nxad.com (Postfix) with ESMTP
id 4BC6B212EF3; Tue, 8 Oct 2002 21:17:52 -0700 (PDT)
Received: by perrin.int.nxad.com (Postfix, from userid 1001)
id C125F20F01; Tue, 8 Oct 2002 21:17:50 -0700 (PDT)
Date: Tue, 8 Oct 2002 21:17:50 -0700
From: Sean Chittenden <sean@chittenden.org>
To: Josh Berkus <josh@agliodbs.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>,
pgsql-performance@postgresql.org
Subject: Re: What does this tell me?
Message-ID: <20021009041750.GB56492@perrin.int.nxad.com>
References: <200210090355.g993tAU02565@candle.pha.pa.us>
<web-1776515@davinci.ethosmedia.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <web-1776515@davinci.ethosmedia.com>
User-Agent: Mutt/1.4i
X-PGP-Key: finger seanc@FreeBSD.org
X-PGP-Fingerprint: 6CEB 1B06 BFD3 70F6 95BE 7E4D 8E85 2E0A 5F5B 3ECB
X-Web-Homepage: http://sean.chittenden.org/
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/75
X-Sequence-Number: 92
> > Oh, yes, you are right. My hardware tuning guide mentions it.
> > Strange it is called the transaction log file:
> >
> > http://www.ca.postgresql.org/docs/momjian/hw_performance/
> >
> > Unless you are seeing this more freqently than every minute, it
> > should
> > be fine.
>
> Actually, it's apparently a real problem, because the function never
> completes. Each cycle of "recycling transaction logs" takes longer
> and longer, and eventually locks up completely.
>
> What the function is doing is a succession of data cleanup
> procedures, updating the same table about 50 times. I will be very
> thankful for the day when I can commit within a procedure.
>
> Unfortunately, I am already at the maximum number of WAL files (64).
> What do I do now?
Isn't it possible to increase the size of your wal logs? I seem to
remember a tunable existing, but I can't find it in the default
config. Someone else know how off the top of their head? -sc
--
Sean Chittenden
From pgsql-performance-owner@postgresql.org Wed Oct 9 00:35:08 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id D0535475F2C
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:35:06 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 415F1475EA4
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:35:06 -0400 (EDT)
Received: from [63.195.55.98] (account <josh@agliodbs.com>)
by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9)
with HTTP id 1776567; Tue, 08 Oct 2002 21:33:52 -0700
From: "Josh Berkus" <josh@agliodbs.com>
Subject: Re: What does this tell me?
To: Bruce Momjian <pgman@candle.pha.pa.us>,
Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
X-Mailer: CommuniGate Pro Web Mailer v.3.5.9
Date: Tue, 08 Oct 2002 21:33:52 -0700
Message-ID: <web-1776567@davinci.ethosmedia.com>
In-Reply-To: <200210090425.g994PrA06235@candle.pha.pa.us>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/76
X-Sequence-Number: 93
Bruce,
> > First, an interesting wierdness from the VACUUM FULL ANALYZE:
> > Analyzing elbs_clidesc
> > 2002-10-08 21:08:08 DEBUG: SIInsertDataEntry: table is 70% full,
> > signaling postmaster
> >
> > Huh?
>
> Well, you are dealing with elbs. That is the problem. ;-)
<grin> As you probably guessed, the purpose of these procedures is to
take a large amount (about 60mb) of not-normalized data from ELBS and
normalize it for our web-based case management system.
What's really frustrating about it is that we're only going to be doing
this for 2-3 months before we jettison ELBS for reasons that should be
obvious to you. But for those 2-3 months, the data transfer needs to
work well, and right now it doesn't even finish.
> You shoulnd't need that and it shouldn't lock up when it gets to 64.
> It
> should checkpoint and move on. The only problem with it being lower
> is
> that it will checkpoint more often.
Well, I'll try 128 and see if that helps any.
>
> > Rest of postgresql.conf params after my signature. All
> suggestions
> > are welcome. This server has been acting "sick" since I started
> with
> > it, under-performing my workstation and MS SQL Server. Either I've
> set
> > something wrong, or there's a hardware problem I need to track
> down.
> >
> > BTW, is there any problem for postgres in turning the fill access
> time
> > recorder in the host filesystem off? This is often good for a
> minor
> > performance gain.
>
> No problem.
>
> You might want to try pgbench and see if that works.
Yeah. I was planning on that -- as well as the postgresql.conf tuner
-- as soon as I can get through one data transfer so that I have a
little working time.
-Josh Berkus
From pgsql-performance-owner@postgresql.org Wed Oct 9 00:38:15 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 1AAFD475FBA
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:38:14 -0400 (EDT)
Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251])
by postgresql.org (Postfix) with ESMTP id 6185D475EA4
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:38:12 -0400 (EDT)
Received: (from pgman@localhost)
by candle.pha.pa.us (8.11.6/8.10.1) id g994cAU07439;
Wed, 9 Oct 2002 00:38:10 -0400 (EDT)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200210090438.g994cAU07439@candle.pha.pa.us>
Subject: Re: What does this tell me?
In-Reply-To: <web-1776567@davinci.ethosmedia.com>
To: Josh Berkus <josh@agliodbs.com>
Date: Wed, 9 Oct 2002 00:38:10 -0400 (EDT)
Cc: pgsql-performance@postgresql.org
X-Mailer: ELM [version 2.4ME+ PL99 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/77
X-Sequence-Number: 94
Josh Berkus wrote:
> > > Rest of postgresql.conf params after my signature. All
> > suggestions
> > > are welcome. This server has been acting "sick" since I started
> > with
> > > it, under-performing my workstation and MS SQL Server. Either I've
> > set
> > > something wrong, or there's a hardware problem I need to track
> > down.
> > >
> > > BTW, is there any problem for postgres in turning the fill access
> > time
> > > recorder in the host filesystem off? This is often good for a
> > minor
> > > performance gain.
> >
> > No problem.
> >
> > You might want to try pgbench and see if that works.
>
> Yeah. I was planning on that -- as well as the postgresql.conf tuner
> -- as soon as I can get through one data transfer so that I have a
> little working time.
I was suggesting pgbench because the system should never lock up on you.
Maybe something is very wrong.
What happens if you issue the CHECKPOINT command?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From pgsql-performance-owner@postgresql.org Wed Oct 9 00:56:43 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id B7373476579
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:56:42 -0400 (EDT)
Received: from joeconway.com (unknown [63.210.180.150])
by postgresql.org (Postfix) with ESMTP id 291D8476576
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 00:56:42 -0400 (EDT)
Received: from [192.168.5.3] (account jconway HELO joeconway.com)
by joeconway.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP-TLS id 1350871; Tue, 08 Oct 2002 21:29:49 -0700
Message-ID: <3DA3B6B9.4010207@joeconway.com>
Date: Tue, 08 Oct 2002 21:55:21 -0700
From: Joe Conway <mail@joeconway.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Josh Berkus <josh@agliodbs.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>,
Sean Chittenden <sean@chittenden.org>, pgsql-performance@postgresql.org
Subject: Re: What does this tell me?
References: <web-1776515@davinci.ethosmedia.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/78
X-Sequence-Number: 95
Josh Berkus wrote:
> What the function is doing is a succession of data cleanup procedures,
> updating the same table about 50 times. I will be very thankful for
> the day when I can commit within a procedure.
If that's the case, can you split the work up into multiple functions, and
execute them all from a shell script? Or perhaps even offload some of the data
massaging to perl or something? (It would be easier to recommend alternate
approaches with more details.)
Joe
From pgsql-performance-owner@postgresql.org Wed Oct 9 01:22:36 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 09F9E47651C
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 01:22:35 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id 6A65D4764C8
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 01:22:34 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g995MQhR017559;
Wed, 9 Oct 2002 01:22:26 -0400 (EDT)
To: "Josh Berkus" <josh@agliodbs.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>,
Sean Chittenden <sean@chittenden.org>, pgsql-performance@postgresql.org
Subject: Re: What does this tell me?
In-reply-to: <web-1776515@davinci.ethosmedia.com>
References: <web-1776515@davinci.ethosmedia.com>
Comments: In-reply-to "Josh Berkus" <josh@agliodbs.com>
message dated "Tue, 08 Oct 2002 21:01:58 -0700"
Date: Wed, 09 Oct 2002 01:22:26 -0400
Message-ID: <17558.1034140946@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/79
X-Sequence-Number: 96
"Josh Berkus" <josh@agliodbs.com> writes:
> Actually, it's apparently a real problem, because the function never
> completes. Each cycle of "recycling transaction logs" takes longer
> and longer, and eventually locks up completely.
> What the function is doing is a succession of data cleanup procedures,
> updating the same table about 50 times. I will be very thankful for
> the day when I can commit within a procedure.
I think you are barking up the wrong tree.
The messages you show are perfectly normal operation, and prove nothing
much except that you pumped a lot of database updates through the
system. I think there's something wrong with your data transformation
application logic; or perhaps you are pumping so many updates through
your tables that you need some intermediate VACUUMs to get rid of
dead tuples. But messing with the WAL log parameters isn't going to
do a darn thing for you ... IMHO anyway.
regards, tom lane
From pgsql-performance-owner@postgresql.org Wed Oct 9 01:23:57 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id A55FE475E60
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 01:23:56 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 193A2475D12
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 01:23:56 -0400 (EDT)
Received: from [63.195.55.98] (account <josh@agliodbs.com>)
by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9)
with HTTP id 1776618; Tue, 08 Oct 2002 22:22:37 -0700
From: "Josh Berkus" <josh@agliodbs.com>
Subject: Re: What does this tell me?
To: Joe Conway <mail@joeconway.com>, Josh Berkus <josh@agliodbs.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>,
Sean Chittenden <sean@chittenden.org>, pgsql-performance@postgresql.org
X-Mailer: CommuniGate Pro Web Mailer v.3.5.9
Date: Tue, 08 Oct 2002 22:22:37 -0700
Message-ID: <web-1776618@davinci.ethosmedia.com>
In-Reply-To: <3DA3B6B9.4010207@joeconway.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/80
X-Sequence-Number: 97
Joe,
> If that's the case, can you split the work up into multiple
> functions, and execute them all from a shell script? Or perhaps even
> offload some of the data massaging to perl or something? (It would be
> easier to recommend alternate approaches with more details.)
I've already split it up into 11 functions, which are being managed
through Perl with ANALYZE statements between. Breaking it down
further would be really unmanageable.
Not to be mean or anything (after all, I just joined pgsql-advocacy),
I'm getting *much* worse performance on large data transformations from
PostgreSQL 7.2.1, than I get from SQL Server 7.0 on inferior hardware
(at least, except where SQL Server 7.0 crashes). I really am determined
to prove that it's because I've misconfigured it, and I thank all of
you for your help in doing so.
PGBench Results:
transaction type: TPC-B (sort of)
scaling factor: 10
number of clients: 100
number of transactions per client: 10
number of transactions actually processed: 1000/1000
tps = 93.206356(including connections establishing)
tps = 103.237007(excluding connections establishing)
Of course, I don't have much to compare these to, so I don't know if
that's good or bad.
-Josh Berkus
From pgsql-general-owner@postgresql.org Wed Oct 9 03:57:38 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id D6D95476461
for <pgsql-general@postgresql.org>;
Wed, 9 Oct 2002 03:57:31 -0400 (EDT)
Received: from email03.aon.at (WARSL402PIP6.highway.telekom.at [195.3.96.93])
by postgresql.org (Postfix) with SMTP id 10906475D12
for <pgsql-general@postgresql.org>;
Wed, 9 Oct 2002 03:57:28 -0400 (EDT)
Received: (qmail 132272 invoked from network); 9 Oct 2002 07:57:27 -0000
Received: from m156p023.dipool.highway.telekom.at (HELO cantor)
([62.46.9.119]) (envelope-sender <mkoi-pg@aon.at>)
by qmail3rs.highway.telekom.at (qmail-ldap-1.03) with SMTP
for <shridhar?daithankar@persistent.co.in>; 9 Oct 2002 07:57:27 -0000
From: Manfred Koizar <mkoi-pg@aon.at>
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Subject: Re: Large databases, performance
Date: Wed, 09 Oct 2002 10:00:03 +0200
Message-ID: <a2n7qu0qen2ne1chalomdgt5n1etgb4uk3@4ax.com>
References: <3D9C3E05.7070906@clearmetrix.com>
<3DA1A331.21316.F7E742B@localhost>
In-Reply-To: <3DA1A331.21316.F7E742B@localhost>
X-Mailer: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="--=_3go7qusj2mfc5mqkb950rta73h7v8jn4qv.MFSBCHJLHS"
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/487
X-Sequence-Number: 31485
----=_3go7qusj2mfc5mqkb950rta73h7v8jn4qv.MFSBCHJLHS
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
On Mon, 07 Oct 2002 15:07:29 +0530, "Shridhar Daithankar"
<shridhar_daithankar@persistent.co.in> wrote:
>Only worry is database size. Postgresql is 111GB v/s 87 GB for mysql.
Shridhar,
here is an implementation of a set of user types: char3, char4,
char10. Put the attached files into a new directory contrib/fixchar,
make, make install, and run fixchar.sql through psql. Then create
your table as
CREATE TABLE tbl (
type int,
esn char10,
min char10,
datetime timestamp,
opc0 char3,
...
rest char4,
field0 int,
field1 char4,
...
)
This should save 76 bytes per heap tuple and 12 bytes per index tuple,
giving a database size of ~ 76 GB. I'd be very interested how this
affects performance.
Code has been tested for v7.2, it crashes on v7.3 beta 1. If this is
a problem, let me know.
Servus
Manfred
----=_3go7qusj2mfc5mqkb950rta73h7v8jn4qv.MFSBCHJLHS
Content-Type: text/plain; charset=us-ascii; name=fixcharNN.sql.in
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=fixcharNN.sql.in
-- User type charNN: space saving replacement for char(NN)
CREATE FUNCTION charNN_in(opaque)
RETURNS charNN
AS '$libdir/fixchar'
LANGUAGE 'c';
CREATE FUNCTION charNN_out(opaque)
RETURNS opaque
AS '$libdir/fixchar'
LANGUAGE 'c';
CREATE TYPE charNN (
INPUT = charNN_in,
OUTPUT = charNN_out,
INTERNALLENGTH = NN,
ALIGNMENT = char
);
-- Operators
CREATE FUNCTION charNN_lt(charNN, charNN)
RETURNS boolean
AS '$libdir/fixchar'
LANGUAGE 'c';
CREATE FUNCTION charNN_le(charNN, charNN)
RETURNS boolean
AS '$libdir/fixchar'
LANGUAGE 'c';
CREATE FUNCTION charNN_eq(charNN, charNN)
RETURNS boolean
AS '$libdir/fixchar'
LANGUAGE 'c';
CREATE FUNCTION charNN_ge(charNN, charNN)
RETURNS boolean
AS '$libdir/fixchar'
LANGUAGE 'c';
CREATE FUNCTION charNN_gt(charNN, charNN)
RETURNS boolean
AS '$libdir/fixchar'
LANGUAGE 'c';
CREATE FUNCTION charNN_ne(charNN, charNN)
RETURNS boolean
AS '$libdir/fixchar'
LANGUAGE 'c';
CREATE OPERATOR < ( LEFTARG = charNN, RIGHTARG = charNN,
PROCEDURE = charNN_lt,
COMMUTATOR = >,
NEGATOR = >=,
RESTRICT = scalarltsel, JOIN = scalarltjoinsel
);
CREATE OPERATOR <= ( LEFTARG = charNN, RIGHTARG = charNN,
PROCEDURE = charNN_le,
COMMUTATOR = >=,
NEGATOR = >,
RESTRICT = scalarltsel, JOIN = scalarltjoinsel
);
CREATE OPERATOR = ( LEFTARG = charNN, RIGHTARG = charNN,
PROCEDURE = charNN_eq,
COMMUTATOR = =,
NEGATOR = !=,
RESTRICT = eqsel, JOIN = eqjoinsel
);
CREATE OPERATOR >= ( LEFTARG = charNN, RIGHTARG = charNN,
PROCEDURE = charNN_ge,
COMMUTATOR = <=,
NEGATOR = <,
RESTRICT = scalargtsel, JOIN = scalargtjoinsel
);
CREATE OPERATOR > ( LEFTARG = charNN, RIGHTARG = charNN,
PROCEDURE = charNN_gt,
COMMUTATOR = <,
NEGATOR = <=,
RESTRICT = scalargtsel, JOIN = scalargtjoinsel
);
CREATE OPERATOR != ( LEFTARG = charNN, RIGHTARG = charNN,
PROCEDURE = charNN_ne,
COMMUTATOR = !=,
NEGATOR = =,
RESTRICT = neqsel, JOIN = neqjoinsel
);
-- btree opclass
INSERT INTO pg_opclass (opcamid, opcname, opcintype, opcdefault, opckeytype)
SELECT a.oid, 'charNN_ops', t.oid, true, 0
FROM pg_am a, pg_type t
WHERE a.amname = 'btree'
AND t.typname = 'charNN';
--btree strategies
CREATE TEMP TABLE charNN_strat (
strat smallint,
opr name
);
INSERT INTO charNN_strat VALUES (1, '<');
INSERT INTO charNN_strat VALUES (2, '<=');
INSERT INTO charNN_strat VALUES (3, '=');
INSERT INTO charNN_strat VALUES (4, '>=');
INSERT INTO charNN_strat VALUES (5, '>');
SELECT o.oid AS opoid, s.strat
INTO TEMP TABLE charNN_ops_tmp
FROM pg_operator o, pg_type t, charNN_strat s
WHERE t.typname = 'charNN'
AND o.oprleft = t.oid
AND o.oprright = t.oid
AND o.oprname = s.opr;
INSERT INTO pg_amop (amopclaid, amopstrategy, amopreqcheck, amopopr)
SELECT oc.oid, c.strat, false, c.opoid
FROM pg_opclass oc, charNN_ops_tmp c, pg_am a
WHERE opcamid = a.oid
AND opcname = 'charNN_ops'
AND a.amname = 'btree';
-- support routine
CREATE FUNCTION charNN_cmp(charNN, charNN)
RETURNS integer
AS '$libdir/fixchar'
LANGUAGE 'c';
INSERT INTO pg_amproc (amopclaid, amprocnum, amproc)
SELECT oc.oid, 1, p.oid
FROM pg_opclass oc, pg_proc p, pg_am a
WHERE a.amname = 'btree'
AND oc.opcamid = a.oid
AND oc.opcname = 'charNN_ops'
AND p.proname = 'charNN_cmp';
----=_3go7qusj2mfc5mqkb950rta73h7v8jn4qv.MFSBCHJLHS
Content-Type: text/plain; charset=us-ascii; name=Makefile
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=Makefile
# fixchar Makefile
#
# Experimental code! Use at your own risk!
# 2002-10-08 mk
subdir = contrib/fixchar
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
MODULE_big = fixchar
OBJS = char3.o char4.o char10.o
DATA_built = fixchar.sql
DOCS = README.fixchar
char%.c: fixcharNN.c.in
sed -e 's/NN/$*/g' $< >$@
fixchar.sql: char3.sql char4.sql char10.sql
cat $^ >$@
char%.sql: fixcharNN.sql.in
sed -e 's/NN/$*/g' $< >$@
include $(top_srcdir)/contrib/contrib-global.mk
----=_3go7qusj2mfc5mqkb950rta73h7v8jn4qv.MFSBCHJLHS
Content-Type: text/plain; charset=us-ascii; name=fixcharNN.c.in
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=fixcharNN.c.in
#include "postgres.h"
char *charNN_in(char *cstr);
char *charNN_out(char *sstr);
bool charNN_lt(char *a, char *b);
bool charNN_le(char *a, char *b);
bool charNN_eq(char *a, char *b);
bool charNN_ge(char *a, char *b);
bool charNN_gt(char *a, char *b);
bool charNN_ne(char *a, char *b);
int4 charNN_cmp(char *a, char *b);
char *
charNN_in(char *cstr)
{
char *result;
int len;
int i;
len = strlen(cstr);
if (len > NN)
len = NN;
result = (char *) palloc(NN);
for (i = 0; i < len; ++i)
result[i] = cstr[i];
for (; i < NN; ++i)
result[i] = ' ';
return result;
}/*charNN_in*/
char *
charNN_out(char *sstr)
{
char *result;
int i;
if (sstr == NULL)
return NULL;
result = (char *) palloc(NN + 1);
for (i = 0; i < NN; ++i)
result[i] = sstr[i];
result[NN] = '\0';
return result;
}/*charNN_out*/
bool
charNN_lt(char *a, char *b)
{
return (strncmp(a, b, NN) < 0);
}/*charNN_lt*/
bool
charNN_le(char *a, char *b)
{
return (strncmp(a, b, NN) <= 0);
}/*charNN_le*/
bool
charNN_eq(char *a, char *b)
{
return (strncmp(a, b, NN) == 0);
}/*charNN_eq*/
bool
charNN_ge(char *a, char *b)
{
return (strncmp(a, b, NN) >= 0);
}/*charNN_ge*/
bool
charNN_gt(char *a, char *b)
{
return (strncmp(a, b, NN) > 0);
}/*charNN_gt*/
bool
charNN_ne(char *a, char *b)
{
return (strncmp(a, b, NN) != 0);
}/*charNN_ne*/
int4
charNN_cmp(char *a, char *b)
{
return strncmp(a, b, NN);
}/*charNN_cmp*/
----=_3go7qusj2mfc5mqkb950rta73h7v8jn4qv.MFSBCHJLHS
Content-Type: text/plain; charset=us-ascii; name=README.fixchar
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=README.fixchar
fixchar
=======
User data types char3, char4 and char10 as space saving replacements
for char(3), char(4), and char(10) respectively.
This is an experimental implementation for Shridhar's high volume
performance tests. It is not expected to be usable in any real world
application. Known problems are at least:
. There are no casting functions
. This does not work with multibyte character sets
Use at your own risk!
I N S T A L L
=============
. Put these files into contrib/fixchar
. cd to contrib/fixchar
. make
. make install
. cd to the directory where PG is installed
. bin/psql yourdb
yourdb=# \i share/postgresql/contrib/fixchar.sql
T E S T
=======
CREATE TABLE short (
i INT,
c3 char3,
c4 char4,
c10 char10,
primary key (i, c3)
);
CREATE TABLE long (
i INT,
c3 char(3),
c4 char(4),
c10 char(10),
primary key (i, c3)
);
INSERT INTO short VALUES (1, 'aaa', 'aaaa', 'a');
INSERT INTO long VALUES (1, 'aaa', 'aaaa', 'a');
INSERT INTO short SELECT i+1, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+1, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+2, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+2, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+4, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+4, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+8, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+8, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+16, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+16, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+32, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+32, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+64, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+64, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+128, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+128, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+256, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+256, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+512, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+512, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+1024, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+1024, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+2048, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+2048, c3, c4, c10 FROM long;
INSERT INTO short SELECT i+4096, c3, c4, c10 FROM short;
INSERT INTO long SELECT i+4096, c3, c4, c10 FROM long;
VACUUM VERBOSE ANALYZE short;
VACUUM VERBOSE ANALYZE long;
SELECT relname,reltuples,relpages FROM pg_class WHERE relname NOT LIKE 'pg%';
relname | reltuples | relpages
------------+-----------+----------
short_pkey | 8192 | 33
short | 8192 | 57
long_pkey | 8192 | 39
long | 8192 | 69
(4 rows)
(2002-10-08 mk)
----=_3go7qusj2mfc5mqkb950rta73h7v8jn4qv.MFSBCHJLHS--
From pgsql-general-owner@postgresql.org Wed Oct 9 04:06:49 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 47B4F475F09
for <pgsql-general@postgresql.org>;
Wed, 9 Oct 2002 04:06:47 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id 92045475B84
for <pgsql-general@postgresql.org>;
Wed, 9 Oct 2002 04:06:45 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g9988KV04620
for <pgsql-general@postgresql.org>; Wed, 9 Oct 2002 13:38:20 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g9988Jv04605;
Wed, 9 Oct 2002 13:38:20 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: Manfred Koizar <mkoi-pg@aon.at>, pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Date: Wed, 09 Oct 2002 13:37:13 +0530
MIME-Version: 1.0
Subject: Re: Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3DA43109.23106.1978CDFD@localhost>
In-reply-to: <a2n7qu0qen2ne1chalomdgt5n1etgb4uk3@4ax.com>
References: <3DA1A331.21316.F7E742B@localhost>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/488
X-Sequence-Number: 31486
On 9 Oct 2002 at 10:00, Manfred Koizar wrote:
> On Mon, 07 Oct 2002 15:07:29 +0530, "Shridhar Daithankar"
> <shridhar_daithankar@persistent.co.in> wrote:
> >Only worry is database size. Postgresql is 111GB v/s 87 GB for mysql.
>
> Shridhar,
>
> here is an implementation of a set of user types: char3, char4,
> char10. Put the attached files into a new directory contrib/fixchar,
> make, make install, and run fixchar.sql through psql. Then create
> your table as
> CREATE TABLE tbl (
> type int,
> esn char10,
> min char10,
> datetime timestamp,
> opc0 char3,
> ...
> rest char4,
> field0 int,
> field1 char4,
> ...
> )
>
> This should save 76 bytes per heap tuple and 12 bytes per index tuple,
> giving a database size of ~ 76 GB. I'd be very interested how this
> affects performance.
>
> Code has been tested for v7.2, it crashes on v7.3 beta 1. If this is
> a problem, let me know.
Thank you very much for this. I would certainly give it a try. Please be
patient as next test is scheuled on monday.
Bye
Shridhar
--
love, n.: When it's growing, you don't mind watering it with a few tears.
From pgsql-general-owner@postgresql.org Wed Oct 9 04:25:01 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id E3F4F475EA4
for <pgsql-general@postgresql.org>;
Wed, 9 Oct 2002 04:24:59 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id 01978475E60
for <pgsql-general@postgresql.org>;
Wed, 9 Oct 2002 04:24:58 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g998QYO06583
for <pgsql-general@postgresql.org>; Wed, 9 Oct 2002 13:56:34 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g998QYv06568;
Wed, 9 Oct 2002 13:56:34 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: Manfred Koizar <mkoi-pg@aon.at>, pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Date: Wed, 09 Oct 2002 13:55:28 +0530
MIME-Version: 1.0
Subject: Re: Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3DA43550.21288.1989824B@localhost>
In-reply-to: <a2n7qu0qen2ne1chalomdgt5n1etgb4uk3@4ax.com>
References: <3DA1A331.21316.F7E742B@localhost>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/489
X-Sequence-Number: 31487
On 9 Oct 2002 at 10:00, Manfred Koizar wrote:
> On Mon, 07 Oct 2002 15:07:29 +0530, "Shridhar Daithankar"
> <shridhar_daithankar@persistent.co.in> wrote:
> >Only worry is database size. Postgresql is 111GB v/s 87 GB for mysql.
>
> Shridhar,
>
> here is an implementation of a set of user types: char3, char4,
> char10. Put the attached files into a new directory contrib/fixchar,
> make, make install, and run fixchar.sql through psql. Then create
> your table as
I had a quick look in things. I think it's a great learning material for pg
internals..;-)
I have a suggestion. In README, it should be worth mentioning that, new types
can be added just by changin Makefile. e.g. Changing line
OBJS = char3.o char4.o char10.o
to
OBJS = char3.o char4.o char5.o char10.o
would add the datatype char5 as well.
Obviously this is for those who might not take efforts to read the source. (
Personally I wouldn't have, had it been part of entire postgres source dump.
Just would have done ./configure;make;make install)
Thanks for the solution. It wouldn't have occurred to me in ages to create a
type for this. I guess that's partly because never used postgresql beyond
select/insert/update/delete. Anyway should have been awake..
Thanks once again
Bye
Shridhar
--
But it's real. And if it's real it can be affected ... we may not be ableto
break it, but, I'll bet you credits to Navy Beans we can put a dent in it. --
deSalle, "Catspaw", stardate 3018.2
From pgsql-general-owner@postgresql.org Wed Oct 9 09:33:14 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 404464760DF; Wed, 9 Oct 2002 09:33:04 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP
id 42696476082; Wed, 9 Oct 2002 09:32:59 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g99DWphR019698;
Wed, 9 Oct 2002 09:32:51 -0400 (EDT)
To: Manfred Koizar <mkoi-pg@aon.at>
Cc: shridhar_daithankar@persistent.co.in, pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Subject: Re: [pgsql-performance] Large databases, performance
In-reply-to: <a2n7qu0qen2ne1chalomdgt5n1etgb4uk3@4ax.com>
References: <3D9C3E05.7070906@clearmetrix.com>
<3DA1A331.21316.F7E742B@localhost>
<a2n7qu0qen2ne1chalomdgt5n1etgb4uk3@4ax.com>
Comments: In-reply-to Manfred Koizar <mkoi-pg@aon.at>
message dated "Wed, 09 Oct 2002 10:00:03 +0200"
Date: Wed, 09 Oct 2002 09:32:50 -0400
Message-ID: <19697.1034170370@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/494
X-Sequence-Number: 31492
Manfred Koizar <mkoi-pg@aon.at> writes:
> here is an implementation of a set of user types: char3, char4,
> char10.
Coupla quick comments on these:
> CREATE FUNCTION charNN_lt(charNN, charNN)
> RETURNS boolean
> AS '$libdir/fixchar'
> LANGUAGE 'c';
> bool
> charNN_lt(char *a, char *b)
> {
> return (strncmp(a, b, NN) < 0);
> }/*charNN_lt*/
These functions are dangerous as written, because they will crash on
null inputs. I'd suggest marking them strict in the function
declarations. Some attention to volatility declarations (isCachable
or isImmutable) would be a good idea too.
Also, it'd be faster and more portable to write the functions with
version-1 calling conventions.
Using the Makefile to auto-create the differently sized versions is
a slick trick...
regards, tom lane
From pgsql-general-owner@postgresql.org Wed Oct 9 09:41:46 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 62F9F476786
for <pgsql-general@postgresql.org>;
Wed, 9 Oct 2002 09:41:44 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id 17A524765E8
for <pgsql-general@postgresql.org>;
Wed, 9 Oct 2002 09:40:43 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g99Deep09786
for <pgsql-general@postgresql.org>; Wed, 9 Oct 2002 19:10:40 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g99Dedv09776;
Wed, 9 Oct 2002 19:10:39 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Date: Wed, 09 Oct 2002 19:11:09 +0530
MIME-Version: 1.0
Subject: Re: [pgsql-performance] Large databases, performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3DA47F4D.12909.1AAA876E@localhost>
References: <a2n7qu0qen2ne1chalomdgt5n1etgb4uk3@4ax.com>
In-reply-to: <19697.1034170370@sss.pgh.pa.us>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/496
X-Sequence-Number: 31494
On 9 Oct 2002 at 9:32, Tom Lane wrote:
> Manfred Koizar <mkoi-pg@aon.at> writes:
> > here is an implementation of a set of user types: char3, char4,
> > char10.
>
> Coupla quick comments on these:
>
> > CREATE FUNCTION charNN_lt(charNN, charNN)
> > RETURNS boolean
> > AS '$libdir/fixchar'
> > LANGUAGE 'c';
>
> > bool
> > charNN_lt(char *a, char *b)
> > {
> > return (strncmp(a, b, NN) < 0);
> > }/*charNN_lt*/
>
> These functions are dangerous as written, because they will crash on
> null inputs. I'd suggest marking them strict in the function
> declarations. Some attention to volatility declarations (isCachable
> or isImmutable) would be a good idea too.
Let me add something. Using char* is bad idea. I had faced a situation recently
on HP-UX 11 that with a libc patch, isspace collapsed for char>127. Fix was to
use unsigned char. There are other places also where the input character is
used as index to an array internally and can cause weird behaviour for values
>127
I will apply both the correction here. Will post the final stuff soon.
Bye
Shridhar
--
Hacker's Quicky #313: Sour Cream -n- Onion Potato Chips Microwave Egg Roll
Chocolate Milk
From pgsql-performance-owner@postgresql.org Wed Oct 9 10:01:56 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 71B0C475DA3
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 10:01:54 -0400 (EDT)
Received: from briar.mmrd.com (unknown [208.255.226.182])
by postgresql.org (Postfix) with ESMTP id 79A62475D12
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 10:01:53 -0400 (EDT)
Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100])
by briar.mmrd.com (8.11.2/8.11.2) with ESMTP id g99ExWF16134;
Wed, 9 Oct 2002 10:59:32 -0400
Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55])
by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id g99E1qx07802;
Wed, 9 Oct 2002 10:01:54 -0400
Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP
(Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id TK2FX4X1; Wed, 9 Oct 2002 10:01:51 -0400
Subject: Re: What does this tell me?
From: Robert Treat <xzilla@users.sourceforge.net>
To: Josh Berkus <josh@agliodbs.com>
Cc: Joe Conway <mail@joeconway.com>, Bruce Momjian <pgman@candle.pha.pa.us>,
Sean Chittenden <sean@chittenden.org>, pgsql-performance@postgresql.org
In-Reply-To: <web-1776618@davinci.ethosmedia.com>
References: <web-1776618@davinci.ethosmedia.com>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 09 Oct 2002 09:57:18 -0400
Message-Id: <1034171838.11703.11.camel@camel>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/86
X-Sequence-Number: 103
On Wed, 2002-10-09 at 01:22, Josh Berkus wrote:
> Joe,
>
> > If that's the case, can you split the work up into multiple
> > functions, and execute them all from a shell script? Or perhaps even
> > offload some of the data massaging to perl or something? (It would be
> > easier to recommend alternate approaches with more details.)
>
> I've already split it up into 11 functions, which are being managed
> through Perl with ANALYZE statements between. Breaking it down
> further would be really unmanageable.
>
If I read Tom's suggestion correctly, you should probably change these
to vacuum analyze instead of analyze.
> Not to be mean or anything (after all, I just joined pgsql-advocacy),
> I'm getting *much* worse performance on large data transformations from
> PostgreSQL 7.2.1, than I get from SQL Server 7.0 on inferior hardware
> (at least, except where SQL Server 7.0 crashes).
what?? that's blasphamy!! revoke this mans advocacy membership right
now!! ;-)
I really am determined
> to prove that it's because I've misconfigured it, and I thank all of
> you for your help in doing so.
>
FWIW I just ran into a similar situation where I was doing 6
simultaneous pg_restores of our production database on my local
workstation. Apparently this pumps a lot of data through the wal logs.
I did kick up the number of wal files, but I also ended up kicking up
the number of wal_buffers as well and that seemed to help.
Robert Treat
From pgsql-general-owner@postgresql.org Wed Oct 9 12:57:16 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 71E7F47688D; Wed, 9 Oct 2002 12:57:14 -0400 (EDT)
Received: from aquilandia.com (unknown [195.55.211.234])
by postgresql.org (Postfix) with ESMTP
id AD2FF4765B3; Wed, 9 Oct 2002 12:57:09 -0400 (EDT)
Received: from leo [213.97.49.3] by aquilandia.com
(SMTPD32-6.06) id A27C3A3C005E; Wed, 09 Oct 2002 19:08:12 +0200
From: "Jose Antonio Leo" <jaleo8@storelandia.com>
To: <pgsql-general@postgresql.org>, <pgsql-sql@postgresql.org>
Subject: problem with the Index
Date: Wed, 9 Oct 2002 18:56:41 +0200
Message-ID: <AEEGKNMMPPBJJDLEJDODEEEMCJAA.jaleo8@storelandia.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
In-Reply-To: <19697.1034170370@sss.pgh.pa.us>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/513
X-Sequence-Number: 31511
I have a problem with the index of 1 table.
I hava a table created :
CREATE TABLE "acucliart" (
"cod_pto" numeric(8,0) NOT NULL,
"cod_cli" varchar(9) NOT NULL,
"mes" numeric(2,0) NOT NULL,
"ano" numeric(4,0) NOT NULL,
"int_art" numeric(5,0) NOT NULL,
"cantidad" numeric(12,2),
"ven_siv_to" numeric(14,2),
"ven_civ_to" numeric(14,2),
"tic_siv_to" numeric(14,2),
"tic_civ_to" numeric(14,2),
"visitas" numeric(2,0),
"ult_vis" date,
"ven_cos" numeric(12,2),
"ven_ofe" numeric(12,2),
"cos_ofe" numeric(12,2),
CONSTRAINT "acucliart_pkey"
PRIMARY KEY ("cod_cli")
);
if i do this select:
explain select * from acucliart where cod_cli=10000;
postgres use the index
NOTICE: QUERY PLAN:
Index Scan using cod_cli_ukey on acucliart (cost=0.00..4.82 rows=1
width=478)
and this select
explain select * from acucliart where cod_cli>10000;
Postgres don't use the index:
NOTICE: QUERY PLAN:
Seq Scan on acucliart (cost=0.00..22.50 rows=333 width=478)
why?
tk
From pgsql-general-owner@postgresql.org Wed Oct 9 13:31:14 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 37203476520; Wed, 9 Oct 2002 13:31:13 -0400 (EDT)
Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178])
by postgresql.org (Postfix) with ESMTP
id 8259C476527; Wed, 9 Oct 2002 13:31:12 -0400 (EDT)
Received: by megazone.bigpanda.com (Postfix, from userid 1001)
id 68A09D60C; Wed, 9 Oct 2002 10:31:12 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
by megazone.bigpanda.com (Postfix) with ESMTP
id 5C3FB5C03; Wed, 9 Oct 2002 10:31:12 -0700 (PDT)
Date: Wed, 9 Oct 2002 10:31:12 -0700 (PDT)
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Jose Antonio Leo <jaleo8@storelandia.com>
Cc: <pgsql-general@postgresql.org>, <pgsql-sql@postgresql.org>
Subject: Re: [SQL] problem with the Index
In-Reply-To: <AEEGKNMMPPBJJDLEJDODEEEMCJAA.jaleo8@storelandia.com>
Message-ID: <20021009102800.U4728-100000@megazone23.bigpanda.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/515
X-Sequence-Number: 31513
On Wed, 9 Oct 2002, Jose Antonio Leo wrote:
> I have a problem with the index of 1 table.
>
> I hava a table created :
> CREATE TABLE "acucliart" (
> "cod_pto" numeric(8,0) NOT NULL,
> "cod_cli" varchar(9) NOT NULL,
> "mes" numeric(2,0) NOT NULL,
> "ano" numeric(4,0) NOT NULL,
> "int_art" numeric(5,0) NOT NULL,
> "cantidad" numeric(12,2),
> "ven_siv_to" numeric(14,2),
> "ven_civ_to" numeric(14,2),
> "tic_siv_to" numeric(14,2),
> "tic_civ_to" numeric(14,2),
> "visitas" numeric(2,0),
> "ult_vis" date,
> "ven_cos" numeric(12,2),
> "ven_ofe" numeric(12,2),
> "cos_ofe" numeric(12,2),
> CONSTRAINT "acucliart_pkey"
> PRIMARY KEY ("cod_cli")
> );
>
> if i do this select:
> explain select * from acucliart where cod_cli=10000;
> postgres use the index
> NOTICE: QUERY PLAN:
> Index Scan using cod_cli_ukey on acucliart (cost=0.00..4.82 rows=1
> width=478)
>
> and this select
> explain select * from acucliart where cod_cli>10000;
> Postgres don't use the index:
> NOTICE: QUERY PLAN:
> Seq Scan on acucliart (cost=0.00..22.50 rows=333 width=478)
>
> why?
Well, how many rows are in the table? In the first case it estimates 1
row will be returned, in the second 333. Index scans are not always faster
than sequential scans as the percentage of the table to scan becomes
larger. If you haven't analyzed recently, you probably should do so and
if you want to compare, set enable_seqscan=off and try an explain there
and see what it gives you.
Also, why are you comparing a varchar(9) column with an integer?
From pgsql-general-owner@postgresql.org Wed Oct 9 14:06:28 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id AD3344760F9
for <pgsql-general@postgresql.org>;
Wed, 9 Oct 2002 14:06:26 -0400 (EDT)
Received: from email03.aon.at (WARSL402PIP6.highway.telekom.at [195.3.96.93])
by postgresql.org (Postfix) with SMTP id CCE39476018
for <pgsql-general@postgresql.org>;
Wed, 9 Oct 2002 14:06:25 -0400 (EDT)
Received: (qmail 60658 invoked from network); 9 Oct 2002 18:06:25 -0000
Received: from m155p004.dipool.highway.telekom.at (HELO cantor) ([62.46.9.68])
(envelope-sender <mkoi-pg@aon.at>)
by qmail3rs.highway.telekom.at (qmail-ldap-1.03) with SMTP
for <tgl@sss.pgh.pa.us>; 9 Oct 2002 18:06:25 -0000
From: Manfred Koizar <mkoi-pg@aon.at>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: shridhar_daithankar@persistent.co.in, pgsql-hackers@postgresql.org,
pgsql-general <pgsql-general@postgresql.org>,
pgsql-performance@postgresql.org
Subject: Re: [pgsql-performance] Large databases, performance
Date: Wed, 09 Oct 2002 20:09:03 +0200
Message-ID: <hnf8quog5p54tf4tu0i12v00bc6bc9h0f2@4ax.com>
References: <3D9C3E05.7070906@clearmetrix.com>
<3DA1A331.21316.F7E742B@localhost>
<a2n7qu0qen2ne1chalomdgt5n1etgb4uk3@4ax.com>
<19697.1034170370@sss.pgh.pa.us>
In-Reply-To: <19697.1034170370@sss.pgh.pa.us>
X-Mailer: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/518
X-Sequence-Number: 31516
On Wed, 09 Oct 2002 09:32:50 -0400, Tom Lane <tgl@sss.pgh.pa.us>
wrote:
>Coupla quick comments on these:
My first attempt on user types; thanks for the tips.
>These functions are dangerous as written, because they will crash on
>null inputs. I'd suggest marking them strict in the function
>declarations.
I was not aware of this, just wondered why bpchar routines didn't
crash :-) Fixed.
>Some attention to volatility declarations (isCachable
>or isImmutable) would be a good idea too.
>Also, it'd be faster and more portable to write the functions with
>version-1 calling conventions.
Done, too. In the meantime I've found out why it crashed with 7.3:
INSERT INTO pg_opclass is now obsolete, have to use CREATE OPERATOR
CLASS ...
Servus
Manfred
From pgsql-performance-owner@postgresql.org Wed Oct 9 15:32:31 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id D73964762B6
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 15:32:25 -0400 (EDT)
Received: from www.fastmail.fm (fastmail.fm [209.61.183.86])
by postgresql.org (Postfix) with ESMTP id 10E9C47625A
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 15:32:25 -0400 (EDT)
Received: from www.fastmail.fm (localhost [127.0.0.1])
by localhost.localdomain (Postfix) with ESMTP id 3CBCF6DC63
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 14:32:20 -0500 (CDT)
Received: from server3.fastmail.fm (server3.internal [10.202.2.134])
by www.fastmail.fm (Postfix) with ESMTP id 297366DC2D
for <pgsql-performance@postgresql.org>;
Wed, 9 Oct 2002 14:32:20 -0500 (CDT)
Received: by server3.fastmail.fm (Postfix, from userid 99)
id C09572FD0D; Wed, 9 Oct 2002 14:32:19 -0500 (CDT)
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="ISO-8859-1"
MIME-Version: 1.0
X-Mailer: MIME::Lite 1.2 (F2.6; T1.001; A1.48; B2.12; Q2.03)
Date: Wed, 9 Oct 2002 19:32:19 UT
From: "Rich Scott" <rich_scott@fastmail.fm>
To: pgsql-performance@postgresql.org
X-Epoch: 1034191940
X-Sasl-enc: acgzKuQLJe351nh8uGzN/A
Message-Id: <20021009193219.C09572FD0D@server3.fastmail.fm>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/88
X-Sequence-Number: 105
subscribe pgsql-performance
From pgsql-performance-owner@postgresql.org Thu Oct 10 09:27:59 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 6C9864766C9
for <pgsql-performance@postgresql.org>;
Thu, 10 Oct 2002 09:27:56 -0400 (EDT)
Received: from email04.aon.at (WARSL402PIP5.highway.telekom.at [195.3.96.79])
by postgresql.org (Postfix) with SMTP id 8786F47634E
for <pgsql-performance@postgresql.org>;
Thu, 10 Oct 2002 09:27:48 -0400 (EDT)
Received: (qmail 84484 invoked from network); 10 Oct 2002 13:27:50 -0000
Received: from m152p011.dipool.highway.telekom.at (HELO cantor)
([62.46.8.235]) (envelope-sender <mkoi-pg@aon.at>)
by qmail5rs.highway.telekom.at (qmail-ldap-1.03) with SMTP
for <shridhar?daithankar@persistent.co.in>; 10 Oct 2002 13:27:50 -0000
From: Manfred Koizar <mkoi-pg@aon.at>
To: shridhar_daithankar@persistent.co.in
Cc: pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org
Subject: contrib/fixchar (Was: Large databases, performance)
Date: Thu, 10 Oct 2002 15:30:31 +0200
Message-ID: <aeuaqu8uk5qi6ledajbu8a0kqk2m2c6m3u@4ax.com>
References: <3D9C3E05.7070906@clearmetrix.com>
<3DA1A331.21316.F7E742B@localhost>
<a2n7qu0qen2ne1chalomdgt5n1etgb4uk3@4ax.com>
In-Reply-To: <a2n7qu0qen2ne1chalomdgt5n1etgb4uk3@4ax.com>
X-Mailer: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/89
X-Sequence-Number: 106
On Wed, 09 Oct 2002 10:00:03 +0200, I wrote:
>here is an implementation of a set of user types: char3, char4,
>char10.
New version available. As I don't want to spam the list with various
versions until I get it right eventually, you can get it from
http://members.aon.at/pivot/pg/fixchar20021010.tgz if you are
interested.
What's new:
. README updated (per Shridhar's suggestion)
. doesn't crash on NULL (p. Tom)
. version-1 calling conventions (p. Tom)
. isCachable (p. Tom)
. works for 7.2 (as delivered) and for 7.3 (make for73)
Shridhar, you were concerned about signed/unsigned chars; looking at
the code I can not see how this is a problem. So no change in this
regard.
Thanks for your comments. Have fun!
Servus
Manfred
From pgsql-performance-owner@postgresql.org Thu Oct 10 09:48:43 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 43076476110
for <pgsql-performance@postgresql.org>;
Thu, 10 Oct 2002 09:48:41 -0400 (EDT)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id 33086475F6E
for <pgsql-performance@postgresql.org>;
Thu, 10 Oct 2002 09:48:39 -0400 (EDT)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g9ADmgJ24361
for <pgsql-performance@postgresql.org>; Thu, 10 Oct 2002 19:18:42 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g9ADmfv24351;
Thu, 10 Oct 2002 19:18:42 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org
Date: Thu, 10 Oct 2002 19:19:11 +0530
MIME-Version: 1.0
Subject: Re: contrib/fixchar (Was: Large databases, performance)
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3DA5D2AF.24682.4EDF20B@localhost>
In-reply-to: <aeuaqu8uk5qi6ledajbu8a0kqk2m2c6m3u@4ax.com>
References: <a2n7qu0qen2ne1chalomdgt5n1etgb4uk3@4ax.com>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/90
X-Sequence-Number: 107
On 10 Oct 2002 at 15:30, Manfred Koizar wrote:
> On Wed, 09 Oct 2002 10:00:03 +0200, I wrote:
> >here is an implementation of a set of user types: char3, char4,
> >char10.
>
> New version available. As I don't want to spam the list with various
> versions until I get it right eventually, you can get it from
> http://members.aon.at/pivot/pg/fixchar20021010.tgz if you are
> interested.
>
> What's new:
>
> . README updated (per Shridhar's suggestion)
> . doesn't crash on NULL (p. Tom)
> . version-1 calling conventions (p. Tom)
> . isCachable (p. Tom)
> . works for 7.2 (as delivered) and for 7.3 (make for73)
>
> Shridhar, you were concerned about signed/unsigned chars; looking at
> the code I can not see how this is a problem. So no change in this
> regard.
Well, this is not related to postgresql exactly but to summerise the problem,
with libc patch PHCO_19090 or compatible upwards, on HP-UX11, isspace does not
work correctly if input value is >127. Can cause lot of problem for an external
app. It works fine with unsigned char
Does not make a difference from postgrersql point of view but would break non-
english locale if they want to use this fix under some situation.
But I agree, unless somebody reports it, no point fixing it and we know the fix
anyway..
Bye
Shridhar
--
Live long and prosper. -- Spock, "Amok Time", stardate 3372.7
From pgsql-performance-owner@postgresql.org Thu Oct 10 11:42:12 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 9D22A476AB3
for <pgsql-performance@postgresql.org>;
Thu, 10 Oct 2002 11:42:11 -0400 (EDT)
Received: from mailhub2.sghms.ac.uk (firewall.sghms.ac.uk [194.82.50.2])
by postgresql.org (Postfix) with ESMTP id D4254476AA9
for <pgsql-performance@postgresql.org>;
Thu, 10 Oct 2002 11:42:10 -0400 (EDT)
Received: from [194.82.51.24] (helo=imail)
by mailhub2.sghms.ac.uk with esmtp (Exim 4.05) id 17zfOH-0002jg-00
for pgsql-performance@postgresql.org; Thu, 10 Oct 2002 16:38:21 +0100
Received: from [172.16.20.3] (mrc1-003.sghms.ac.uk [172.16.20.3])
by imail.sghms.ac.uk
(iPlanet Messaging Server 5.1 HotFix 0.7 (built May 7 2002))
with ESMTPA id <0H3R00F69VLCP1@imail.sghms.ac.uk> for
pgsql-performance@postgresql.org; Thu, 10 Oct 2002 16:41:36 +0100 (BST)
Date: Thu, 10 Oct 2002 16:41:43 +0100
From: Adam Witney <awitney@sghms.ac.uk>
To: pgsql-performance <pgsql-performance@postgresql.org>
Message-id: <B9CB5E47.949D%a.witney@sghms.ac.uk>
MIME-version: 1.0
User-Agent: Microsoft-Entourage/10.1.0.2006
Subject: Info on explain output
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
X-Spam-Status: No, hits=-99.5 required=5.5
tests=TO_LOCALPART_EQ_REAL,USER_IN_WHITELIST version=2.31
X-Spam-Level:
X-MailScanner: Found to be clean
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/91
X-Sequence-Number: 108
Hi,
I am trying to optimise a complex query adding explicit joins and creating
indices. I am going through the EXPLAIN output (~70 lines) but am fairly new
at reading these.
Are there any good rules of thumb of things one should be looking out for in
EXPLAIN output? ie <blah> means that an index would be good here etc
I have read through the docs for EXPLAIN, but I was wondering if there were
any more detailed descriptions or docs on the subject.
Thanks for any help
adam
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
From pgsql-performance-owner@postgresql.org Thu Oct 10 12:44:12 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 1E007476112
for <pgsql-performance@postgresql.org>;
Thu, 10 Oct 2002 12:44:11 -0400 (EDT)
Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251])
by postgresql.org (Postfix) with ESMTP id 79A2F47600C
for <pgsql-performance@postgresql.org>;
Thu, 10 Oct 2002 12:44:08 -0400 (EDT)
Received: (from pgman@localhost)
by candle.pha.pa.us (8.11.6/8.10.1) id g9AGi1F17476;
Thu, 10 Oct 2002 12:44:01 -0400 (EDT)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200210101644.g9AGi1F17476@candle.pha.pa.us>
Subject: Re: Info on explain output
In-Reply-To: <B9CB5E47.949D%a.witney@sghms.ac.uk>
To: Adam Witney <awitney@sghms.ac.uk>
Date: Thu, 10 Oct 2002 12:44:01 -0400 (EDT)
Cc: pgsql-performance <pgsql-performance@postgresql.org>
X-Mailer: ELM [version 2.4ME+ PL99 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/92
X-Sequence-Number: 109
Have you looked at the internals PDF at the bottom of the developers
lounge web page?
---------------------------------------------------------------------------
Adam Witney wrote:
> Hi,
>
> I am trying to optimise a complex query adding explicit joins and creating
> indices. I am going through the EXPLAIN output (~70 lines) but am fairly new
> at reading these.
>
> Are there any good rules of thumb of things one should be looking out for in
> EXPLAIN output? ie <blah> means that an index would be good here etc
>
> I have read through the docs for EXPLAIN, but I was wondering if there were
> any more detailed descriptions or docs on the subject.
>
> Thanks for any help
>
> adam
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From pgsql-performance-owner@postgresql.org Thu Oct 10 12:59:20 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 03F4F475D0D
for <pgsql-performance@postgresql.org>;
Thu, 10 Oct 2002 12:59:19 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 67C10475CA9
for <pgsql-performance@postgresql.org>;
Thu, 10 Oct 2002 12:59:18 -0400 (EDT)
Received: from [216.135.165.74] (account <josh@agliodbs.com>)
by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9)
with HTTP id 1780475; Thu, 10 Oct 2002 09:59:18 -0700
From: "Josh Berkus" <josh@agliodbs.com>
Subject: Re: Info on explain output
To: Bruce Momjian <pgman@candle.pha.pa.us>, Adam Witney <awitney@sghms.ac.uk>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
X-Mailer: CommuniGate Pro Web Mailer v.3.5.9
Date: Thu, 10 Oct 2002 09:59:18 -0700
Message-ID: <web-1780475@davinci.ethosmedia.com>
In-Reply-To: <200210101644.g9AGi1F17476@candle.pha.pa.us>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/93
X-Sequence-Number: 110
Adam,
> > Are there any good rules of thumb of things one should be looking
> out for in
> > EXPLAIN output? ie <blah> means that an index would be good here
> etc
Also try:
1) Various articles on Techdocs.postgresql.org
2) Ewald G.'s PostgreSQL Book
Explain output is not that easily converted into a plan of action ...
otherwise, Postgres would have automated it, neh? You have to get a
feel for what looks good and bad dynamically.
-Josh Berkus
From pgsql-performance-owner@postgresql.org Fri Oct 11 03:14:49 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 872C947590C; Fri, 11 Oct 2002 03:14:46 -0400 (EDT)
Received: from relay.icomedias.com (relay.icomedias.com [62.99.232.66])
by postgresql.org (Postfix) with ESMTP
id 3499A474E5C; Fri, 11 Oct 2002 03:14:45 -0400 (EDT)
Received: from 10.192.17.128 ([10.192.17.128])
by relay.icomedias.com (8.12.5/8.12.5) with ESMTP id g9B7Egcj021890;
Fri, 11 Oct 2002 09:14:43 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Mario Weilguni <mweilguni@sime.com>
To: pgsql-performance@postgresql.org
Subject: number of attributes in page files?
Date: Fri, 11 Oct 2002 09:14:50 +0200
User-Agent: KMail/1.4.3
Cc: pgsql-hackers@postgresql.org
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210110914.50377.mweilguni@sime.com>
avpresult: 0, ok, ok
X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang)
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/94
X-Sequence-Number: 111
Is it possible to get rid of the "t_natts" fields in the tuple header? Is t=
his field only for "alter table add/drop" support? Then it might
possible to get rid of it and put the "t_natts" field in the page header, n=
ot the tuple header, if it can be assured that when updating/inserting
records only a compatible (a page file with the same number of attributes) =
page file is used. Especially master-detail tables would=20
profit from this, reducing the tuple overhead by another 9%.
Might this be possible?
Regards,
Mario Weilguni
From pgsql-performance-owner@postgresql.org Fri Oct 11 04:43:59 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 827DE475F63
for <pgsql-performance@postgresql.org>;
Fri, 11 Oct 2002 04:43:57 -0400 (EDT)
Received: from relay.icomedias.com (relay.icomedias.com [62.99.232.66])
by postgresql.org (Postfix) with ESMTP id 450C5475F34
for <pgsql-performance@postgresql.org>;
Fri, 11 Oct 2002 04:43:55 -0400 (EDT)
Received: from 10.192.17.128 ([10.192.17.128])
by relay.icomedias.com (8.12.5/8.12.5) with ESMTP id g9B8htcj022876
for <pgsql-performance@postgresql.org>; Fri, 11 Oct 2002 10:43:55 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Mario Weilguni <mweilguni@sime.com>
To: pgsql-performance@postgresql.org
Subject: Compile test with gcc 3.2
Date: Fri, 11 Oct 2002 10:44:03 +0200
User-Agent: KMail/1.4.3
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210111044.03361.mweilguni@sime.com>
avpresult: 0, ok, ok
X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang)
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/95
X-Sequence-Number: 112
If you want to get the max (CPU) performance and use gcc, you should give t=
he -fprofile-arcs / -fbranch-probabilties options of gcc 3.2 a try.=20
For 50 pgbench read-only runs (1 mio tuples, 40000 txs, 10 clients) I get 1=
4.4% speedup.=20
Then I tried it with real data from our production system.
This is 2GB data, 120 tables, but most of the data is large object data (1.=
8GB), so most tables of the database are in-memory and the application is =
more cpu bound.
With this scenario, I still get 8% improvement.=20
All tests done on an Athlon XP/1500, 768MB RAM, Linux 2.4.19, gcc 3.2, 5400=
RPM Maxtor.
Might be worth a try. Probably the performance win will be smaller for larg=
er databases.
Regards,
Mario Weilguni
From pgsql-performance-owner@postgresql.org Fri Oct 11 08:12:54 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 2D8F44766CB; Fri, 11 Oct 2002 08:12:49 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP
id 4829D47675B; Fri, 11 Oct 2002 08:12:48 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g9BCCohR004296;
Fri, 11 Oct 2002 08:12:51 -0400 (EDT)
To: Mario Weilguni <mweilguni@sime.com>
Cc: pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] number of attributes in page files?
In-reply-to: <200210110914.50377.mweilguni@sime.com>
References: <200210110914.50377.mweilguni@sime.com>
Comments: In-reply-to Mario Weilguni <mweilguni@sime.com>
message dated "Fri, 11 Oct 2002 09:14:50 +0200"
Date: Fri, 11 Oct 2002 08:12:50 -0400
Message-ID: <4295.1034338370@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/96
X-Sequence-Number: 113
Mario Weilguni <mweilguni@sime.com> writes:
> Is it possible to get rid of the "t_natts" fields in the tuple header?
> Is this field only for "alter table add/drop" support?
"Only"? A lot of people consider that pretty important ...
But removing 2 bytes isn't going to save anything, on most machines,
because of alignment considerations.
regards, tom lane
From pgsql-performance-owner@postgresql.org Fri Oct 11 10:00:08 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 0096E475EAA; Fri, 11 Oct 2002 10:00:05 -0400 (EDT)
Received: from relay.icomedias.com (relay.icomedias.com [62.99.232.66])
by postgresql.org (Postfix) with ESMTP
id 8B3F1475E8A; Fri, 11 Oct 2002 10:00:03 -0400 (EDT)
Received: from 10.192.17.128 ([10.192.17.128])
by relay.icomedias.com (8.12.5/8.12.5) with ESMTP id g9BE05cj027587;
Fri, 11 Oct 2002 16:00:05 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Mario Weilguni <mweilguni@sime.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [HACKERS] number of attributes in page files?
Date: Fri, 11 Oct 2002 16:00:13 +0200
User-Agent: KMail/1.4.3
Cc: pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org
References: <200210110914.50377.mweilguni@sime.com>
<4295.1034338370@sss.pgh.pa.us>
In-Reply-To: <4295.1034338370@sss.pgh.pa.us>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210111600.13876.mweilguni@sime.com>
avpresult: 0, ok, ok
X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang)
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/97
X-Sequence-Number: 114
Am Freitag, 11. Oktober 2002 14:12 schrieb Tom Lane:
> Mario Weilguni <mweilguni@sime.com> writes:
> > Is it possible to get rid of the "t_natts" fields in the tuple header?
> > Is this field only for "alter table add/drop" support?
>
> "Only"? A lot of people consider that pretty important ...
With "only" I mean it's an administrative task which requires operator inte=
rvenation anyways, and it's a seldom needed operation which may take longer=
, when
queries become faster.
>
> But removing 2 bytes isn't going to save anything, on most machines,
> because of alignment considerations.
ok, I did not consider alignment, but the question remains, is this easily =
doable? Especially because only one another byte has to be saved for
real saving on many architectures, which is t_hoff. IMO t_hoff is not usefu=
l because it can be computed easily. This would give 20 byte headers instea=
d of 23 (24) bytes as it's now.=20
This is 17% saved, and if it's not too complicated it might be worth to con=
sider.
Best regards,
Mario Weilguni
From pgsql-performance-owner@postgresql.org Fri Oct 11 10:34:56 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id D6681476103
for <pgsql-performance@postgresql.org>;
Fri, 11 Oct 2002 10:34:54 -0400 (EDT)
Received: from web80307.mail.yahoo.com (web80307.mail.yahoo.com
[66.218.79.23])
by postgresql.org (Postfix) with SMTP id D7E9B4760AB
for <pgsql-performance@postgresql.org>;
Fri, 11 Oct 2002 10:34:53 -0400 (EDT)
Message-ID: <20021011143458.48739.qmail@web80307.mail.yahoo.com>
Received: from [210.23.216.156] by web80307.mail.yahoo.com via HTTP;
Fri, 11 Oct 2002 07:34:58 PDT
Date: Fri, 11 Oct 2002 07:34:58 -0700 (PDT)
From: Ludwig Lim <lud_nowhere_man@yahoo.com>
Subject: Re: Compile test with gcc 3.2
To: Mario Weilguni <mweilguni@sime.com>
Cc: PostgreSQL Mailing List <pgsql-performance@postgresql.org>
In-Reply-To: <200210111044.03361.mweilguni@sime.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/98
X-Sequence-Number: 115
Hi Mario:
--- Mario Weilguni <mweilguni@sime.com> wrote:
> If you want to get the max (CPU) performance and use
> gcc, you should give the -fprofile-arcs /
> -fbranch-probabilties options of gcc 3.2 a try.
> For 50 pgbench read-only runs (1 mio tuples, 40000
> txs, 10 clients) I get 14.4% speedup.
>
> Then I tried it with real data from our production
> system.
> This is 2GB data, 120 tables, but most of the data
> is large object data (1.8GB), so most tables of the
> database are in-memory and the application is more
> cpu bound.
> With this scenario, I still get 8% improvement.
>
> All tests done on an Athlon XP/1500, 768MB RAM,
> Linux 2.4.19, gcc 3.2, 5400 RPM Maxtor.
>
> Might be worth a try. Probably the performance win
> will be smaller for larger databases.
- Do you use the "-fprofile-arcs
-fbranch-probabilties" options with other optimization
flags? I've in a book (Optimimizing Red Hat Linux 6.2)
that one could also optimize speed by setting the
CFLAGS to the following :
" -02 -fomit-frame-pointers -funroll-loops" and
running "strip" on the on binaries after they are
compiled.
regards,
ludwig.
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
From pgsql-performance-owner@postgresql.org Fri Oct 11 12:01:40 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 80F57475F1B; Fri, 11 Oct 2002 12:01:38 -0400 (EDT)
Received: from kumudu.nslk.com (kumudu.nslk.com [64.247.55.254])
by postgresql.org (Postfix) with ESMTP
id F1B7A475EF7; Fri, 11 Oct 2002 12:01:37 -0400 (EDT)
Received: from [203.94.89.226] (helo=W)
by kumudu.nslk.com with asmtp (Exim 3.36 #1)
id 1802EM-00072v-00; Fri, 11 Oct 2002 12:01:39 -0400
Message-ID: <008c01c2713f$a86eb0a0$e2595ecb@A.GEEKIYANAGE>
Reply-To: "Waruna Geekiyanage" <waruna@nirmani.com>
From: "Waruna Geekiyanage" <waruna@nirmani.com>
To: <pgsql-php@postgresql.org>
Cc: <pgsql-performance@postgresql.org>
Subject: syncronize databases
Date: Fri, 11 Oct 2002 22:02:31 +0600
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0089_01C27171.E5414BA0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-AntiAbuse: This header was added to track abuse,
please include it with any abuse report
X-AntiAbuse: Primary Hostname - kumudu.nslk.com
X-AntiAbuse: Original Domain - postgresql.org
X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [0 0]
X-AntiAbuse: Sender Address Domain - nirmani.com
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/99
X-Sequence-Number: 116
This is a multi-part message in MIME format.
------=_NextPart_000_0089_01C27171.E5414BA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I need to syncronize two pgsql databases runing on RedHat linux7.2.
One is on our LAN and other one on the internet which we connect through a =
dialup connection.
Waruna
------=_NextPart_000_0089_01C27171.E5414BA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2479.6" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I need to syncronize two pgsql databases r=
uning on=20
RedHat linux7.2.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>One is on our LAN and other one on the int=
ernet=20
which we connect through a dialup connection.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Waruna</FONT></DIV></BODY></HTML>
------=_NextPart_000_0089_01C27171.E5414BA0--
From pgsql-performance-owner@postgresql.org Fri Oct 11 15:23:56 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id F0A434768C1
for <pgsql-performance@postgresql.org>;
Fri, 11 Oct 2002 15:23:55 -0400 (EDT)
Received: from absinthe.carnagecopia.com (absinthe.carnagecopia.com
[216.187.87.246])
by postgresql.org (Postfix) with SMTP id 1DBE247668C
for <pgsql-performance@postgresql.org>;
Fri, 11 Oct 2002 15:23:55 -0400 (EDT)
Received: (qmail 71289 invoked by uid 85); 11 Oct 2002 19:23:50 -0000
Received: from random@goblinstudios.com by absinthe.carnagecopia.com with
qmail-scanner-1.03 (uvscan: v4.1.60/v4228. . Clean. Processed
in 0.383563 secs); 11 Oct 2002 19:23:50 -0000
Received: from unknown (HELO workstation-22.internal.carnagecopia.com)
(204.244.192.2)
by absinthe.carnagecopia.com with SMTP; 11 Oct 2002 19:23:50 -0000
Date: Fri, 11 Oct 2002 15:24:29 -0400
From: Vincent Janelle <random@goblinstudios.com>
To: Ludwig Lim <lud_nowhere_man@yahoo.com>
Cc: mweilguni@sime.com, pgsql-performance@postgresql.org
Subject: Re: Compile test with gcc 3.2
Message-Id: <20021011152429.6ef918d1.random@goblinstudios.com>
In-Reply-To: <20021011143458.48739.qmail@web80307.mail.yahoo.com>
References: <200210111044.03361.mweilguni@sime.com>
<20021011143458.48739.qmail@web80307.mail.yahoo.com>
Organization: http://www.goblinstudios.com/
X-Mailer: Sylpheed version 0.8.1 (GTK+ 1.2.10; i586-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/100
X-Sequence-Number: 117
except when you run the regression tests you get some very interesting results.
On Fri, 11 Oct 2002 07:34:58 -0700 (PDT)
Ludwig Lim <lud_nowhere_man@yahoo.com> wrote:
>
> - Do you use the "-fprofile-arcs
> -fbranch-probabilties" options with other optimization
> flags? I've in a book (Optimimizing Red Hat Linux 6.2)
> that one could also optimize speed by setting the
> CFLAGS to the following :
> " -02 -fomit-frame-pointers -funroll-loops" and
> running "strip" on the on binaries after they are
> compiled.
>
From pgsql-performance-owner@postgresql.org Wed Oct 16 14:02:25 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 8B0F3475E8A
for <pgsql-performance@postgresql.org>;
Wed, 16 Oct 2002 14:02:22 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id EA7F8475DF2
for <pgsql-performance@postgresql.org>;
Wed, 16 Oct 2002 14:02:21 -0400 (EDT)
Received: from [66.219.92.2] (HELO chocolate-mousse)
by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9)
with ESMTP id 1788844 for pgsql-performance@postgresql.org;
Wed, 16 Oct 2002 11:02:59 -0700
Content-Type: text/plain;
charset="us-ascii"
From: Josh Berkus <josh@agliodbs.com>
Reply-To: josh@agliodbs.com
Organization: Aglio Database Solutions
To: pgsql-performance@postgresql.org
Subject: PG_Autotune 0.1
Date: Tue, 15 Oct 2002 11:00:58 -0700
X-Mailer: KMail [version 1.4]
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210151100.58044.josh@agliodbs.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/101
X-Sequence-Number: 118
Folks, Justin,
Hey, I've been tinkering with PG_autotune in an effort to make it usable on=
my=20
installation.=20=20=20
http://gborg.postgresql.org/project/pgautotune/projdisplay.php
First off, thank you Justin for getting inspired and writing the starter=20
version. This is something that would probably have remained *way* down t=
he=20
Postgres TODO list, were it not for you.=20
Since it's such a great idea, I'd like to make it bulletproof so that it ca=
n=20
become part of the standard Postgres distribution. I'm hoping that people=
=20
on this list can help.
Problems, Bugs, & Suggestions:
1) The program makes the assumption that the Postgres superuser is named=20
"pgsql", forcing me to do a search-and-replace on the source to make it wor=
k=20
at all on my system, where the superuser is named "postgres". This should=
=20
be a configuration option. Places I've identified where this is an issue:=
=20=20
a. the connection to the "metrics" database, b. the calls to Postgres=20
executables (which are also sometimes made as the console user, causing the=
m=20
to fail if you run the program as "root").
2) The program also assumes that all Postgres binaries are symlinked in=20
/usr/local/bin. Since this symlinking isn't done by Postgres-make-instal=
l,=20
wouldn't it be better to reference $PGHOME/bin?=20=20=20
3) For that matter, it would be nice if the program would test $PGDATA and=
=20
$PGHOME, and prompt the user if they are empty.
4) The shell scripts need to have error-checking so that they exit if anyth=
ing=20
blows up. I can write this if Justin can explain what the shell scripts a=
re=20
supposed to do, exactly, and where errors are acceptable.
5) We need installation docs. I can write these. Sometime soon, really!
Questions & Suggestions for Enhancement:
6) The shared_buffers param is capped at 500. Isn't this awfully low for a=
=20
production server? What's the logic here?
7) Any ideas on how to get around/adjust memory maximums for the host OS?=
=20=20
This is easy on Linux, but other *nixes are not so easy.
8) What will be the difficulties in expanding the script to adjust more=20
Postgresql.conf params, such as checkpoint_segments? Can we use feedback=
=20
from the log to adjust these?
9) I *love* the idea of letting the benchmarking script run custom queries.=
=20=20=20
However, I would dearly like to expand it, letting it randomly grab from a=
=20
list of 10 custom queries entered by the user into a file or files. This=
=20
would allow the user to create a realistic mix of simple and complex querie=
s,=20
including some data manipulation and procedures.
10) Can we eventually adjust the program to get feedback from system tools =
and=20
give the user hints on hardware limitations? For example, have the program=
=20
test if, at maximum settings, queries are slow but CPU and RAM are only 10%=
=20
utilized and tell the user "Your hard drives are probably too slow"?
I can help with: documentation, shell scripting, Linux system issues. Oth=
er=20
volunteers to help?
--=20
-Josh Berkus
Aglio Database Solutions
San Francisco
From pgsql-performance-owner@postgresql.org Thu Oct 17 10:44:57 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 0D7A24762A1
for <pgsql-performance@postgresql.org>;
Thu, 17 Oct 2002 10:44:55 -0400 (EDT)
Received: from utahisp.com (unknown [66.239.12.3])
by postgresql.org (Postfix) with ESMTP id BCAF74761C6
for <pgsql-performance@postgresql.org>;
Thu, 17 Oct 2002 10:44:53 -0400 (EDT)
Received: from chad [63.230.8.76] by utahisp.com
(SMTPD32-5.05) id AC881A1D03B6; Thu, 17 Oct 2002 08:43:20 -0600
Message-ID: <068c01c275eb$c9ba4f70$32021aac@chad>
From: "Chad Thompson" <chad@weblinkservices.com>
To: "pgsql-performance" <pgsql-performance@postgresql.org>
Subject: Max time queries
Date: Thu, 17 Oct 2002 08:45:07 -0600
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0689_01C275B9.7E6D0A30"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Declude-Sender: chad@weblinkservices.com [63.230.8.76]
X-Note: This E-mail was scanned by Declude JunkMail (www.declude.com) for
spam.
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/102
X-Sequence-Number: 119
This is a multi-part message in MIME format.
------=_NextPart_000_0689_01C275B9.7E6D0A30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Heres an oddity. Why would it take more time to not find an answer than it=
would to find one?=20=20
Here are my 2 queries.
The Cold Fusion output of the query is followed by an explain analyze.
maxTime (Records=3D0, Time=3D2223ms)
SQL =3D=20
select cr.start_time as max
from call_results cr, timezone tz, lists l
where (cr.start_time between '10/15/2002 08:00' and '10/15/2002 23:00')
and l.full_phone =3D cr.phonenum
and l.area_code =3D tz.area_code
and tz.greenwich =3D '-7'
and cr.project_id =3D 11
and l.client_id =3D 8=20
order by cr.start_time desc
limit 1
NOTICE: QUERY PLAN:
Limit (cost=3D0.00..1544.78 rows=3D1 width=3D49) (actual time=3D2299.11..2=
299.11 rows=3D0 loops=3D1)
-> Nested Loop (cost=3D0.00..1266550.38 rows=3D820 width=3D49) (actual =
time=3D2299.10..2299.10 rows=3D0 loops=3D1)
-> Nested Loop (cost=3D0.00..776978.04 rows=3D90825 width=3D42) (=
actual time=3D0.84..1849.97 rows=3D9939 loops=3D1)
-> Index Scan Backward using start_time_idx on call_results =
cr (cost=3D0.00..6569.39 rows=3D6693 width=3D22) (actual time=3D0.38..303.=
58 rows=3D9043 loops=3D1)
-> Index Scan using full_phone_idx on lists l (cost=3D0.00.=
.114.94 rows=3D14 width=3D20) (actual time=3D0.15..0.16 rows=3D1 loops=3D90=
43)
-> Index Scan using area_code_idx on timezone tz (cost=3D0.00..5.=
38 rows=3D1 width=3D7) (actual time=3D0.04..0.04 rows=3D0 loops=3D9939)
Total runtime: 2300.55 msec
maxTime (Records=3D1, Time=3D10ms)
SQL =3D=20
select cr.start_time as max
from call_results cr, timezone tz, lists l
where (cr.start_time between '10/15/2002 08:00' and '10/15/2002 23:00')
and l.full_phone =3D cr.phonenum
and l.area_code =3D tz.area_code
and tz.greenwich =3D '-8'
and cr.project_id =3D 11
and l.client_id =3D 8=20
order by cr.start_time desc
limit 1
NOTICE: QUERY PLAN:
Limit (cost=3D0.00..331.03 rows=3D1 width=3D49) (actual time=3D1.19..1.53 =
rows=3D1 loops=3D1)
-> Nested Loop (cost=3D0.00..1266550.38 rows=3D3826 width=3D49) (actual=
time=3D1.19..1.52 rows=3D2 loops=3D1)
-> Nested Loop (cost=3D0.00..776978.04 rows=3D90825 width=3D42) (=
actual time=3D0.84..1.10 rows=3D2 loops=3D1)
-> Index Scan Backward using start_time_idx on call_results =
cr (cost=3D0.00..6569.39 rows=3D6693 width=3D22) (actual time=3D0.39..0.48=
rows=3D2 loops=3D1)
-> Index Scan using full_phone_idx on lists l (cost=3D0.00.=
.114.94 rows=3D14 width=3D20) (actual time=3D0.30..0.30 rows=3D1 loops=3D2)
-> Index Scan using area_code_idx on timezone tz (cost=3D0.00..5.=
38 rows=3D1 width=3D7) (actual time=3D0.19..0.20 rows=3D1 loops=3D2)
Total runtime: 1.74 msec
------=_NextPart_000_0689_01C275B9.7E6D0A30
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2719.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>Heres an oddity. Why would it take more time to not find an answ=
er=20
than it would to find one? </DIV>
<DIV><FONT face=3DArial size=3D2>Here are my 2 queries.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The Cold Fusion output of the query is fol=
lowed by=20
an explain analyze.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><STRONG>maxTime</STRONG> (Records=3D0, Time=3D2223ms)<BR>SQL =3D <BR>s=
elect=20
cr.start_time as max<BR> from call_results cr, timezone tz, lists=20
l<BR> where (cr.start_time between '10/15/2002 08:00' and '10/15/2002=20
23:00')<BR> and l.full_phone =3D cr.phonenum<BR> and l.area_code =3D=
=20
tz.area_code<BR> and tz.greenwich =3D '-7'<BR> and cr.project_id =3D=
=20
11<BR> and l.client_id =3D 8 <BR> order by cr.start_time desc<BR> =
limit=20
1</DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>NOTICE: QUERY PLAN:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Limit (cost=3D0.00..1544.78 rows=3D1=
width=3D49)=20
(actual time=3D2299.11..2299.11 rows=3D0 loops=3D1)<BR> -> N=
ested=20
Loop (cost=3D0.00..1266550.38 rows=3D820 width=3D49) (actual=20
time=3D2299.10..2299.10 rows=3D0=20
loops=3D1)<BR> -> Nested=
=20
Loop (cost=3D0.00..776978.04 rows=3D90825 width=3D42) (actual time=3D=
0.84..1849.97=20
rows=3D9939=20
loops=3D1)<BR> &=
nbsp; =20
-> Index Scan Backward using start_time_idx on call_results cr&nbs=
p;=20
(cost=3D0.00..6569.39 rows=3D6693 width=3D22) (actual time=3D0.38..303.58 r=
ows=3D9043=20
loops=3D1)<BR> &=
nbsp; =20
-> Index Scan using full_phone_idx on lists l (cost=3D0.00..=
114.94=20
rows=3D14 width=3D20) (actual time=3D0.15..0.16 rows=3D1=20
loops=3D9043)<BR> -> Ind=
ex Scan=20
using area_code_idx on timezone tz (cost=3D0.00..5.38 rows=3D1 width=
=3D7)=20
(actual time=3D0.04..0.04 rows=3D0 loops=3D9939)<BR>Total runtime: 2300.55=
=20
msec<BR></FONT></DIV>
<DIV><BR><STRONG>maxTime</STRONG> (Records=3D1, Time=3D10ms)<BR>SQL =3D <BR=
>select=20
cr.start_time as max<BR> from call_results cr, timezone tz, lists=20
l<BR> where (cr.start_time between '10/15/2002 08:00' and '10/15/2002=20
23:00')<BR> and l.full_phone =3D cr.phonenum<BR> and l.area_code =3D=
=20
tz.area_code<BR> and tz.greenwich =3D '-8'<BR> and cr.project_id =3D=
=20
11<BR> and l.client_id =3D 8 <BR> order by cr.start_time desc<BR> =
limit=20
1<BR> NOTICE: QUERY PLAN:</DIV>
<DIV> </DIV>
<DIV>Limit (cost=3D0.00..331.03 rows=3D1 width=3D49) (actual time=3D1=
.19..1.53=20
rows=3D1 loops=3D1)<BR> -> Nested Loop (cost=3D0.00..1=
266550.38=20
rows=3D3826 width=3D49) (actual time=3D1.19..1.52 rows=3D2=20
loops=3D1)<BR> -> Nested=
=20
Loop (cost=3D0.00..776978.04 rows=3D90825 width=3D42) (actual time=3D=
0.84..1.10=20
rows=3D2=20
loops=3D1)<BR> &=
nbsp; =20
-> Index Scan Backward using start_time_idx on call_results cr&nbs=
p;=20
(cost=3D0.00..6569.39 rows=3D6693 width=3D22) (actual time=3D0.39..0.48 row=
s=3D2=20
loops=3D1)<BR> &=
nbsp; =20
-> Index Scan using full_phone_idx on lists l (cost=3D0.00..=
114.94=20
rows=3D14 width=3D20) (actual time=3D0.30..0.30 rows=3D1=20
loops=3D2)<BR> -> Index =
Scan=20
using area_code_idx on timezone tz (cost=3D0.00..5.38 rows=3D1 width=
=3D7)=20
(actual time=3D0.19..0.20 rows=3D1 loops=3D2)<BR>Total runtime: 1.74=20
msec<BR></DIV></BODY></HTML>
------=_NextPart_000_0689_01C275B9.7E6D0A30--
From pgsql-performance-owner@postgresql.org Thu Oct 17 21:37:25 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id B9C6947687B
for <pgsql-performance@postgresql.org>;
Thu, 17 Oct 2002 21:37:24 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id E4C3A47687A
for <pgsql-performance@postgresql.org>;
Thu, 17 Oct 2002 21:37:23 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g9I1bRhR013381;
Thu, 17 Oct 2002 21:37:27 -0400 (EDT)
To: "Chad Thompson" <chad@weblinkservices.com>
Cc: "pgsql-performance" <pgsql-performance@postgresql.org>
Subject: Re: Max time queries
In-reply-to: <068c01c275eb$c9ba4f70$32021aac@chad>
References: <068c01c275eb$c9ba4f70$32021aac@chad>
Comments: In-reply-to "Chad Thompson" <chad@weblinkservices.com>
message dated "Thu, 17 Oct 2002 08:45:07 -0600"
Date: Thu, 17 Oct 2002 21:37:27 -0400
Message-ID: <13380.1034905047@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/103
X-Sequence-Number: 120
"Chad Thompson" <chad@weblinkservices.com> writes:
> Heres an oddity. Why would it take more time to not find an answer than it
> would to find one?
Because the successful query stops as soon as it's exhausted the LIMIT
(ie, after it's found the first matching combination of rows). The
failing query has to run through the whole tables looking in vain for
a match. Note the difference in number of rows scanned in the lower
levels of your query.
regards, tom lane
From pgsql-performance-owner@postgresql.org Mon Oct 21 02:23:35 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id C01EC475D00
for <pgsql-performance@postgresql.org>;
Mon, 21 Oct 2002 02:23:33 -0400 (EDT)
Received: from relay.icomedias.com (relay.icomedias.com [62.99.232.66])
by postgresql.org (Postfix) with ESMTP id 9D1DA475A9E
for <pgsql-performance@postgresql.org>;
Mon, 21 Oct 2002 02:23:31 -0400 (EDT)
Received: from 10.192.17.128 ([10.192.17.128])
by relay.icomedias.com (8.12.5/8.12.5) with ESMTP id g9L6NQcj021530
for <pgsql-performance@postgresql.org>; Mon, 21 Oct 2002 08:23:27 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Mario Weilguni <mweilguni@sime.com>
To: pgsql-performance@postgresql.org
Subject: Self-generating statistics?
Date: Mon, 21 Oct 2002 08:23:33 +0200
User-Agent: KMail/1.4.3
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210210823.33744.mweilguni@sime.com>
avpresult: 0, ok, ok
X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang)
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/104
X-Sequence-Number: 121
Something that might be worth considering:
Many of the performance problems on pgsql-general seem to be related to the=
fact that no analyze is performed after the creation on the tables, so
maybe this might be an option to fix that (in future releases): when a tabl=
e has no statistics at all, and the first seq-scan on the table is
performed, it might improve further performance if this seq-scan is used to=
get table statistics too. This should not be too expensive since reading t=
he
table has to be done only once. Further queries will have at least prelimin=
ary statistics at hand.
I'm not sure how (CPU) expensive statistic-gathering is, but if most of the=
work is reading the tuples, it might be a win to do this.
Regards,
Mario Weilguni
From pgsql-performance-owner@postgresql.org Mon Oct 21 03:05:00 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 837AF475956
for <pgsql-performance@postgresql.org>;
Mon, 21 Oct 2002 03:04:58 -0400 (EDT)
Received: from web80305.mail.yahoo.com (web80305.mail.yahoo.com
[66.218.79.21])
by postgresql.org (Postfix) with SMTP id B71E4475461
for <pgsql-performance@postgresql.org>;
Mon, 21 Oct 2002 03:04:57 -0400 (EDT)
Message-ID: <20021021070458.3513.qmail@web80305.mail.yahoo.com>
Received: from [203.87.150.116] by web80305.mail.yahoo.com via HTTP;
Mon, 21 Oct 2002 00:04:58 PDT
Date: Mon, 21 Oct 2002 00:04:58 -0700 (PDT)
From: Ludwig Lim <lud_nowhere_man@yahoo.com>
Subject: Default cost variables in postgresql.conf
To: PostgreSQL Mailing List <pgsql-performance@postgresql.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/105
X-Sequence-Number: 122
Hi:
Are the "cost" variables (e.g.
random_page_cost,cpu_tuple_cost,cpu_index_tuple_cost)
in postgresql.conf optimal for a particular set of
platform / hardware requirements? (i.e. the configs
works best for let say if you have PIII computer w/
IDE as storage).
I'm asking this since a lot of softwares' configs
are defaulted to a "conservative" settings where
allowances are given for people who have older/slower
CPUs(w/ not so large amount of memory).
Thank you in advance.
ludwig.
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
From pgsql-performance-owner@postgresql.org Mon Oct 21 03:36:07 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id E20EF475FB9
for <pgsql-performance@postgresql.org>;
Mon, 21 Oct 2002 03:36:04 -0400 (EDT)
Received: from bob.samurai.com (bob.samurai.com [205.207.28.75])
by postgresql.org (Postfix) with ESMTP id 70A01476238
for <pgsql-performance@postgresql.org>;
Mon, 21 Oct 2002 03:35:38 -0400 (EDT)
Received: from tokyo.samurai.com (DU150.N224.ResNet.QueensU.CA
[130.15.224.150]) by bob.samurai.com (Postfix) with ESMTP
id DAE351D46; Mon, 21 Oct 2002 03:35:28 -0400 (EDT)
To: Mario Weilguni <mweilguni@sime.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Self-generating statistics?
References: <200210210823.33744.mweilguni@sime.com>
From: Neil Conway <neilc@samurai.com>
In-Reply-To: <200210210823.33744.mweilguni@sime.com>
Date: 21 Oct 2002 03:34:56 -0400
Message-ID: <87y98sz1lr.fsf@mailbox.samurai.com>
Lines: 27
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/106
X-Sequence-Number: 123
Mario Weilguni <mweilguni@sime.com> writes:
> Many of the performance problems on pgsql-general seem to be related
> to the fact that no analyze is performed after the creation on the
> tables
Well, there are lots of other ways an incompetent DBA can screw up a
database. The need to VACUUM and ANALYZE is stated clearly in the
docs. Providing workarounds for negligence isn't the right path to get
started down, IMHO.
That said, the general idea of a self-tuning database system has
merit, IMHO. For example, this paper proposes a histogram data
structure that can be updated fairly cheaply based on data gathered
from query execution:
http://citeseer.nj.nec.com/255752.html
A bunch of industry players (IBM, Microsoft, etc.) are putting some
work into this area (IBM calls it "autonomic computing", for
example). It might be an interesting area to look at in the future...
Cheers,
Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
From pgsql-performance-owner@postgresql.org Mon Oct 21 09:00:23 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id B2A4C475BEC
for <pgsql-performance@postgresql.org>;
Mon, 21 Oct 2002 09:00:22 -0400 (EDT)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id A7A66475ADE
for <pgsql-performance@postgresql.org>;
Mon, 21 Oct 2002 09:00:21 -0400 (EDT)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 183cAT-00049D-00
for <pgsql-performance@postgresql.org>; Mon, 21 Oct 2002 09:00:25 -0400
Date: Mon, 21 Oct 2002 09:00:25 -0400
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Self-generating statistics?
Message-ID: <20021021090025.B14840@mail.libertyrms.com>
Mail-Followup-To: pgsql-performance@postgresql.org
References: <200210210823.33744.mweilguni@sime.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <200210210823.33744.mweilguni@sime.com>;
from mweilguni@sime.com on Mon, Oct 21, 2002 at 08:23:33AM +0200
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/107
X-Sequence-Number: 124
On Mon, Oct 21, 2002 at 08:23:33AM +0200, Mario Weilguni wrote:
> Something that might be worth considering:
>
> Many of the performance problems on pgsql-general seem to be
> related to the fact that no analyze is performed after the creation
> on the tables, so maybe this might be an option to fix that (in
> future releases): when a table has no statistics at all, and the
> first seq-scan on the table is
It's never the case that a table has no statistics at all. It has
default ones. Maybe they're right; it's hard to know.
Someone has posted on gborg an anto-vacuum daemon that might be of
use in this situation.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-performance-owner@postgresql.org Mon Oct 21 10:28:47 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id BC2E14766BC
for <pgsql-performance@postgresql.org>;
Mon, 21 Oct 2002 10:17:37 -0400 (EDT)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id B2468476E4C
for <pgsql-performance@postgresql.org>;
Mon, 21 Oct 2002 10:16:16 -0400 (EDT)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 183dLx-0005Go-00
for <pgsql-performance@postgresql.org>; Mon, 21 Oct 2002 10:16:21 -0400
Date: Mon, 21 Oct 2002 10:16:21 -0400
From: Andrew Sullivan <andrew@libertyrms.info>
To: PostgreSQL Mailing List <pgsql-performance@postgresql.org>
Subject: Re: Default cost variables in postgresql.conf
Message-ID: <20021021101621.A19970@mail.libertyrms.com>
Mail-Followup-To: PostgreSQL Mailing List <pgsql-performance@postgresql.org>
References: <20021021070458.3513.qmail@web80305.mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <20021021070458.3513.qmail@web80305.mail.yahoo.com>;
from lud_nowhere_man@yahoo.com on Mon, Oct 21, 2002 at 12:04:58AM
-0700
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/108
X-Sequence-Number: 125
On Mon, Oct 21, 2002 at 12:04:58AM -0700, Ludwig Lim wrote:
> Hi:
>
> Are the "cost" variables (e.g.
> random_page_cost,cpu_tuple_cost,cpu_index_tuple_cost)
> in postgresql.conf optimal for a particular set of
> platform / hardware requirements? (i.e. the configs
Not exactly. They're best guesses. If you check the admin guide,
you'll see that there's a note about these which says that there is
not a well-defined method for calculating these things, so you are
encouraged to experiment and share your findings. They _are_ known
to be conservative defaults, like everything else in the system.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-performance-owner@postgresql.org Tue Oct 22 07:47:36 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 46E4C475C26
for <pgsql-performance@postgresql.org>;
Tue, 22 Oct 2002 07:47:36 -0400 (EDT)
Received: from web80303.mail.yahoo.com (web80303.mail.yahoo.com
[66.218.79.19])
by postgresql.org (Postfix) with SMTP id A6FB347592C
for <pgsql-performance@postgresql.org>;
Tue, 22 Oct 2002 07:47:35 -0400 (EDT)
Message-ID: <20021022114738.77366.qmail@web80303.mail.yahoo.com>
Received: from [203.87.150.116] by web80303.mail.yahoo.com via HTTP;
Tue, 22 Oct 2002 04:47:38 PDT
Date: Tue, 22 Oct 2002 04:47:38 -0700 (PDT)
From: Ludwig Lim <lud_nowhere_man@yahoo.com>
Subject: Selective usage of index in planner/optimizer (Too conservative?)
To: PostgreSQL Mailing List <pgsql-performance@postgresql.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/109
X-Sequence-Number: 126
Hi:
I was testing a database when notice that it does not
used the new index I created. So after a couple of
VACUUM ANALYZE it tried the following test queries.
**** TEST CASE #1 ***********
loyalty=# set enable_seqscan=off;
SET VARIABLE
loyalty=# explain analyze select count(*) from points
where branch_cd=1 ;
NOTICE: QUERY PLAN:
Aggregate (cost=119123.54..119123.54 rows=1 width=0)
(actual time=811.08..811.0
8 rows=1 loops=1)
-> Index Scan using idx_monthly_branch on points
(cost=0.00..1187
65.86 rows=143073 width=0) (actual time=0.19..689.75
rows=136790 loops=1)
Total runtime: 811.17 msec
***** TEST CASE #2 *********
loyalty=# set enable_seqscan=on;
SET VARIABLE
loyalty=# explain analyze select count(*) from points
where branch_cd=1 ;
NOTICE: QUERY PLAN:
Aggregate (cost=62752.34..62752.34 rows=1 width=0)
(actual time=3593.93..3593.9
3 rows=1 loops=1)
-> Seq Scan on points (cost=0.00..62681.70
rows=28254 width=0) (a
ctual time=0.33..3471.54 rows=136790 loops=1)
Total runtime: 3594.01 msec
*** TEST CASE #3 (Sequential scan turned off) ******
loyalty=# explain select * from points where
branch_cd=5;
NOTICE: QUERY PLAN:
Index Scan using idx_monthly_branch on points
(cost=0.00..49765.12 r
ows=16142 width=55)
I am wondering why in test case #2 it did not use
an index scan, where as in case #3 it did. The number
of rows in test #2 and #3 are just a small subset of
table "points".
The following are the number of elements in the
table:
branch_cd = 1 ---> 136,970
branch_cd = 5 ---> 39,385
count(*) ---> 2,570,173
Its rather strange why "SELECT COUNT(*)...WHERE
branch_cd=1" uses sequential scan even though it just
comprises 5.3% of whole table...
I'ts also strange because of the ff: (Remember test
case 1 and 2 are the same query)
test 1 --> seq_scan=off --> 811.17 msec
test 2 --> seq_scan=on --> 3594.01 msec
Test #1 have 400% improvement over Test #2, yet the
query plan for test #2 is the default.
Are there way to let the planner improve the choice
in using an index or not? BTW the "cost" variables
are set to the default for the test.
Thank you in advance.
ludwig.
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
From pgsql-performance-owner@postgresql.org Tue Oct 22 10:24:22 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 7200547667E
for <pgsql-performance@postgresql.org>;
Tue, 22 Oct 2002 10:24:21 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id BBF11476678
for <pgsql-performance@postgresql.org>;
Tue, 22 Oct 2002 10:24:20 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g9MEOOhR018688;
Tue, 22 Oct 2002 10:24:25 -0400 (EDT)
To: Ludwig Lim <lud_nowhere_man@yahoo.com>
Cc: PostgreSQL Mailing List <pgsql-performance@postgresql.org>
Subject: Re: Selective usage of index in planner/optimizer (Too conservative?)
In-reply-to: <20021022114738.77366.qmail@web80303.mail.yahoo.com>
References: <20021022114738.77366.qmail@web80303.mail.yahoo.com>
Comments: In-reply-to Ludwig Lim <lud_nowhere_man@yahoo.com>
message dated "Tue, 22 Oct 2002 04:47:38 -0700"
Date: Tue, 22 Oct 2002 10:24:24 -0400
Message-ID: <18687.1035296664@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/110
X-Sequence-Number: 127
Ludwig Lim <lud_nowhere_man@yahoo.com> writes:
> NOTICE: QUERY PLAN:
> Aggregate (cost=119123.54..119123.54 rows=1 width=0)
> (actual time=811.08..811.0
> 8 rows=1 loops=1)
> -> Index Scan using idx_monthly_branch on points
> (cost=0.00..1187
> 65.86 rows=143073 width=0) (actual time=0.19..689.75
> rows=136790 loops=1)
> Total runtime: 811.17 msec
> NOTICE: QUERY PLAN:
> Aggregate (cost=62752.34..62752.34 rows=1 width=0)
> (actual time=3593.93..3593.9
> 3 rows=1 loops=1)
> -> Seq Scan on points (cost=0.00..62681.70
> rows=28254 width=0) (a
> ctual time=0.33..3471.54 rows=136790 loops=1)
> Total runtime: 3594.01 msec
Something fishy about this --- why is the estimated number of rows
different in the two cases (143073 vs 28254)? Did you redo VACUUM
and/or ANALYZE in between?
> I am wondering why in test case #2 it did not use
> an index scan, where as in case #3 it did.
Probably because it knows "branch_cd=5" is more selective than
"branch_cd=1". It would be useful to see the pg_stats entry for
branch_cd.
> Its rather strange why "SELECT COUNT(*)...WHERE
> branch_cd=1" uses sequential scan even though it just
> comprises 5.3% of whole table...
No, what's strange is that it's faster to use an indexscan for that.
The table must be very nearly in order by branch_cd; have you clustered
it recently?
regards, tom lane
From pgsql-performance-owner@postgresql.org Tue Oct 22 21:48:03 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 7F9F547610B
for <pgsql-performance@postgresql.org>;
Tue, 22 Oct 2002 21:48:01 -0400 (EDT)
Received: from web80310.mail.yahoo.com (web80310.mail.yahoo.com
[66.218.79.26])
by postgresql.org (Postfix) with SMTP id B3FAF4760AA
for <pgsql-performance@postgresql.org>;
Tue, 22 Oct 2002 21:48:00 -0400 (EDT)
Message-ID: <20021023014804.72515.qmail@web80310.mail.yahoo.com>
Received: from [203.87.150.116] by web80310.mail.yahoo.com via HTTP;
Tue, 22 Oct 2002 18:48:04 PDT
Date: Tue, 22 Oct 2002 18:48:04 -0700 (PDT)
From: Ludwig Lim <lud_nowhere_man@yahoo.com>
Subject: Re: Selective usage of index in planner/optimizer (Too conservative?)
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Mailing List <pgsql-performance@postgresql.org>
In-Reply-To: <18687.1035296664@sss.pgh.pa.us>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/111
X-Sequence-Number: 128
--- Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Something fishy about this --- why is the estimated
> number of rows
> different in the two cases (143073 vs 28254)? Did
> you redo VACUUM
> and/or ANALYZE in between?
I neither VACUUMed nor ANALYZEd between the 2
cases.
>
> > I am wondering why in test case #2 it did not
> use
> > an index scan, where as in case #3 it did.
>
> Probably because it knows "branch_cd=5" is more
> selective than
> "branch_cd=1". It would be useful to see the
> pg_stats entry for
> branch_cd.
Should I try altering the statistics? I tried
ANALYZE points(branch_cd);
but it still gave me the same results.
> > Its rather strange why "SELECT COUNT(*)...WHERE
> > branch_cd=1" uses sequential scan even though it
> just
> > comprises 5.3% of whole table...
What I mean is the table is rather large. (2
million rows) and I thought the planner would
automatically used an index to retrieve a small subset
(based on the percentage) of the large table.
> No, what's strange is that it's faster to use an
> indexscan for that.
> The table must be very nearly in order by branch_cd;
> have you clustered
> it recently?
I never clustered the table.
But prior to testing I dropped an index and create
a new one. Does dropping and creating index "confuse"
the planner even after a VACUUM ANALYZE?
I seem to notice this trend everytime I add a new
index to the table. It would slow down and the
performance would gradually improve in a day or two.
Should I try changing "cost" variables? I'm using
Pentium IV, with SCSI [RAID 5].
regards,
ludwig.
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
From pgsql-performance-owner@postgresql.org Wed Oct 23 03:47:10 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 181DA475D70
for <pgsql-performance@postgresql.org>;
Wed, 23 Oct 2002 03:47:07 -0400 (EDT)
Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66])
by postgresql.org (Postfix) with ESMTP id B8EBA476020
for <pgsql-performance@postgresql.org>;
Wed, 23 Oct 2002 03:47:05 -0400 (EDT)
Received: from klaster.net (pr150.krakow.cvx.ppp.tpnet.pl [213.76.42.150])
by serwer.skawsoft.com.pl (Postfix) with ESMTP id D6BE62B2B9
for <pgsql-performance@postgresql.org>;
Wed, 23 Oct 2002 09:40:33 +0200 (CEST)
Message-ID: <3DB65566.6060906@klaster.net>
Date: Wed, 23 Oct 2002 09:53:10 +0200
From: Tomasz Myrta <jasiek@klaster.net>
User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; PL; rv:1.1) Gecko/20020826
X-Accept-Language: pl, en-us, en
MIME-Version: 1.0
To: pgsql-performance@postgresql.org
Subject: joining views
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/112
X-Sequence-Number: 129
Hi
I'd like to split queries into views, but I can't join them - planner
search all of records instead of using index. It works very slow.
Here is example:
1) create table1(
id1 integer primary key,
...fields...
);
table1 has thousands rows >40000.
2) create index ind_pkey on table1(id1);
3) create view some_view as select
id1,...fields...
from table1
join ...(10 joins);
4) create view another_view as select
id1,...fields...
from table1
join ... (5 joins)
4) Now here is the problem:
explain select * from some_view where id1=1234;
result: 100
explain select * from another_view where id1=1234;
result: 80
explain select * from some_view v1, another_view v2
where v1.id1=1234 and v2.id1=1234
result: 210
Execution plan looks like planner finds 1 record from v1, so cost of
searching v1 is about 100. After this planner finds 1 record from v2
(cost 80) and it's like I want to have.
explain select * from some_view v1 join another_view v2 using(id1)
where v1.id1=1234;
result: 10000 (!)
explain select * from some_view v1 join some_view v2 using(id1)
where v1.id1=1234;
result: 10000 (!)
Even joining the same view doesn't work well.
Execution plan looks like planner finds 1 record from v1, so cost of
searching v1 is about 100. After this planner search all of records from
v2 (40000 records, cost 9000) and then performs join with v1.
I know that I can make only single view without joining views, but it
makes me a big mess.
Regards,
Tomasz Myrta
From pgsql-performance-owner@postgresql.org Wed Oct 23 10:31:21 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 07F8D476936
for <pgsql-performance@postgresql.org>;
Wed, 23 Oct 2002 10:31:18 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id 0CDA647692F
for <pgsql-performance@postgresql.org>;
Wed, 23 Oct 2002 10:31:17 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g9NEVJhR000983;
Wed, 23 Oct 2002 10:31:19 -0400 (EDT)
To: Tomasz Myrta <jasiek@klaster.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: joining views
In-reply-to: <3DB65566.6060906@klaster.net>
References: <3DB65566.6060906@klaster.net>
Comments: In-reply-to Tomasz Myrta <jasiek@klaster.net>
message dated "Wed, 23 Oct 2002 09:53:10 +0200"
Date: Wed, 23 Oct 2002 10:31:18 -0400
Message-ID: <982.1035383478@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/113
X-Sequence-Number: 130
Tomasz Myrta <jasiek@klaster.net> writes:
> I'd like to split queries into views, but I can't join them - planner
> search all of records instead of using index. It works very slow.
I think this is the same issue that Stephan identified in his response
to your other posting ("sub-select with aggregate"). When you write
FROM x join y using (col) WHERE x.col = const
the WHERE-restriction is only applied to x. I'm afraid you'll need
to write
FROM x join y using (col) WHERE x.col = const AND y.col = const
Ideally you should be able to write just
FROM x join y using (col) WHERE col = const
but I think that will be taken the same as "x.col = const" :-(
regards, tom lane
From pgsql-performance-owner@postgresql.org Wed Oct 23 10:56:27 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id AD85D476346
for <pgsql-performance@postgresql.org>;
Wed, 23 Oct 2002 10:56:26 -0400 (EDT)
Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66])
by postgresql.org (Postfix) with ESMTP id 0287447623F
for <pgsql-performance@postgresql.org>;
Wed, 23 Oct 2002 10:56:26 -0400 (EDT)
Received: from klaster.net (pr150.krakow.cvx.ppp.tpnet.pl [213.76.42.150])
by serwer.skawsoft.com.pl (Postfix) with ESMTP
id 926F42B2B9; Wed, 23 Oct 2002 16:49:55 +0200 (CEST)
Message-ID: <3DB6BA0A.4060502@klaster.net>
Date: Wed, 23 Oct 2002 17:02:34 +0200
From: Tomasz Myrta <jasiek@klaster.net>
User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; PL; rv:1.1) Gecko/20020826
X-Accept-Language: pl, en-us, en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: joining views
References: <3DB65566.6060906@klaster.net> <982.1035383478@sss.pgh.pa.us>
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/114
X-Sequence-Number: 131
U�ytkownik Tom Lane napisa�:
> I think this is the same issue that Stephan identified in his response
> to your other posting ("sub-select with aggregate"). When you write
> FROM x join y using (col) WHERE x.col = const
> the WHERE-restriction is only applied to x. I'm afraid you'll need
> to write
> FROM x join y using (col) WHERE x.col = const AND y.col = const
> Ideally you should be able to write just
> FROM x join y using (col) WHERE col = const
> but I think that will be taken the same as "x.col = const" :-(
I am sad, but you are right. Using views this way will look strange:
create view v3 as select
v1.id as id1,
v2.id as id2,
...
from some_view v1, another_view v2;
select * from v3 where
id1=1234 and id2=1234;
Is it possible to make it look better?
And how to pass param=const to subquery ("sub-select with aggregate") if
I want to create view with this query?
Tomasz Myrta
From pgsql-performance-owner@postgresql.org Sat Oct 26 06:27:52 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 25C494758BD
for <pgsql-performance@postgresql.org>;
Sat, 26 Oct 2002 06:27:49 -0400 (EDT)
Received: from technovell.com (213-97-10-232.uc.nombres.ttd.es
[213.97.10.232])
by postgresql.org (Postfix) with ESMTP id C7295475843
for <pgsql-performance@postgresql.org>;
Sat, 26 Oct 2002 06:27:47 -0400 (EDT)
Received: from pgsql [192.168.1.200] by technovell.com
with NIMS ModWeb Module; Sat, 26 Oct 2002 12:27:28 +0200
Subject: Basic question about indexes/explain
From: Terry Yapt <pgsql@technovell.com>
To: pgsql-performance@postgresql.org
Date: Sat, 26 Oct 2002 12:27:28 +0200
X-Mailer: NIMS ModWeb Module
X-Sender: pgsql
MIME-Version: 1.0
Message-ID: <1035628048.81bd0c0pgsql@technovell.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/115
X-Sequence-Number: 132
Hi all,
I have a basic doubt about indexes... in the next example:
-- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
DROP TABLE ctest;
CREATE TABLE ctest
( cusid numeric(5) PRIMARY KEY NOT NULL, -- Customer ID.
namec varchar(10) NOT NULL, -- Customer Name.
surnc varchar(20), -- Customer Surname.
cashc numeric(10,4) -- Customer Cash.
);
CREATE INDEX ctest_cashc ON ctest (cashc);
INSERT INTO ctest VALUES (10,'Ten Custom','S.Ten Customer',1000);
INSERT INTO ctest VALUES (5 ,'Five Custo','S.Five Customer',500);
INSERT INTO ctest VALUES (8, 'Eigth Cust','S.Eigth Customer',800);
INSERT INTO ctest VALUES (90,'Nine Custo','S.Nine Customer',9000);
INSERT INTO ctest VALUES (70,'Seven Cust','S.Seven Customer',7000);
-- Next two SELECT will execute using index Scan on ctest_pkey
explain SELECT * from ctest WHERE cusid between 5 AND 10 AND cashc < 1000;
explain SELECT * from ctest WHERE cusid =3D5 AND cashc =3D 1000;
CREATE INDEX ctest_othec ON ctest (cusid, cashc);
-- Next two SELECT will execute using Seq Scan.
explain SELECT * from ctest WHERE cusid between 5 AND 10 AND cashc < 1000;
explain SELECT * from ctest WHERE cusid =3D5 AND cashc =3D 1000;
-- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
SELECTs executed before CREATE INDEX ctest_othec... are using index scan on=
PRIMARY KEY, but after the CREATE INDEX all SELECTs are using seq scan.
Seq Scan has lower cost than index scan (I think because there are few rows=
in table).
But if we have an index with the two colums I am using in the WHERE clause,=
why is the planner using seq scan ? (Or perhaps it is because too few row=
s in the table ?)....
Thanks..
From pgsql-performance-owner@postgresql.org Sat Oct 26 07:40:10 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 1F9F1475843
for <pgsql-performance@postgresql.org>;
Sat, 26 Oct 2002 07:40:09 -0400 (EDT)
Received: from relay.icomedias.com (relay.icomedias.com [62.99.232.66])
by postgresql.org (Postfix) with ESMTP id 791C94753A1
for <pgsql-performance@postgresql.org>;
Sat, 26 Oct 2002 07:40:06 -0400 (EDT)
Received: from loki ([10.192.17.128])
by relay.icomedias.com (8.12.5/8.12.5) with ESMTP id g9QBdq33021779;
Sat, 26 Oct 2002 13:39:57 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: Mario Weilguni <mweilguni@sime.com>
To: Terry Yapt <pgsql@technovell.com>,
pgsql-performance@postgresql.org
Subject: Re: Basic question about indexes/explain
Date: Sat, 26 Oct 2002 13:40:06 +0200
User-Agent: KMail/1.4.3
References: <1035628048.81bd0c0pgsql@technovell.com>
In-Reply-To: <1035628048.81bd0c0pgsql@technovell.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210261340.06876.mweilguni@sime.com>
avpresult: 0, ok, ok
X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang)
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/116
X-Sequence-Number: 133
Am Samstag, 26. Oktober 2002 12:27 schrieb Terry Yapt:
> Hi all,
>
snip
> I have a basic doubt about indexes... in the next example:
> But if we have an index with the two colums I am using in the WHERE claus=
e,
> why is the planner using seq scan ? (Or perhaps it is because too few ro=
ws
> in the table ?)....
First of all, you did not analyze your table (at least you did not mention =
you did). And an index is never a win for such a small table. I think the p=
lanner is fine here to select a seq scan, because your whole table is only =
1 database page, so it would be no win to check the index here.
Everything is explained in the manual, check http://developer.postgresql.or=
g/docs/postgres/indexes.html
regards,
mario weilguni
From pgsql-performance-owner@postgresql.org Sat Oct 26 10:24:55 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 08A38475FEB
for <pgsql-performance@postgresql.org>;
Sat, 26 Oct 2002 10:24:55 -0400 (EDT)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id 67276475EB2
for <pgsql-performance@postgresql.org>;
Sat, 26 Oct 2002 10:24:54 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g9QEOqhR027302;
Sat, 26 Oct 2002 10:24:53 -0400 (EDT)
To: Mario Weilguni <mweilguni@sime.com>
Cc: Terry Yapt <pgsql@technovell.com>,
pgsql-performance@postgresql.org
Subject: Re: Basic question about indexes/explain
In-reply-to: <200210261340.06876.mweilguni@sime.com>
References: <1035628048.81bd0c0pgsql@technovell.com>
<200210261340.06876.mweilguni@sime.com>
Comments: In-reply-to Mario Weilguni <mweilguni@sime.com>
message dated "Sat, 26 Oct 2002 13:40:06 +0200"
Date: Sat, 26 Oct 2002 10:24:52 -0400
Message-ID: <27301.1035642292@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/117
X-Sequence-Number: 134
Mario Weilguni <mweilguni@sime.com> writes:
> Everything is explained in the manual, check
> http://developer.postgresql.org/docs/postgres/indexes.html
In particular note the comments at the bottom of
http://developer.postgresql.org/docs/postgres/performance-tips.html:
"It is worth noting that EXPLAIN results should not be extrapolated to
situations other than the one you are actually testing; for example,
results on a toy-sized table can't be assumed to apply to large
tables. The planner's cost estimates are not linear and so it may well
choose a different plan for a larger or smaller table. An extreme
example is that on a table that only occupies one disk page, you'll
nearly always get a sequential scan plan whether indexes are available
or not. The planner realizes that it's going to take one disk page read
to process the table in any case, so there's no value in expending
additional page reads to look at an index."
regards, tom lane
From pgsql-performance-owner@postgresql.org Sat Oct 26 18:35:27 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 83119475C85
for <pgsql-performance@postgresql.org>;
Sat, 26 Oct 2002 18:35:25 -0400 (EDT)
Received: from VL-MS-MR004.sc1.videotron.ca (relais.videotron.ca
[24.201.245.36])
by postgresql.org (Postfix) with ESMTP id 15CB1475BEC
for <pgsql-performance@postgresql.org>;
Sat, 26 Oct 2002 18:35:25 -0400 (EDT)
Received: from mochima.com ([24.202.175.133]) by VL-MS-MR004.sc1.videotron.ca
(iPlanet Messaging Server 5.2 HotFix 0.9 (built Jul 29 2002))
with ESMTP id <0H4M009DT1GHJS@VL-MS-MR004.sc1.videotron.ca> for
pgsql-performance@postgresql.org; Sat, 26 Oct 2002 18:36:17 -0400 (EDT)
Date: Sat, 26 Oct 2002 18:36:05 -0400
From: Carlos Moreno <moreno@mochima.com>
Subject: Setting shared buffers
To: pgsql-performance@postgresql.org
Message-id: <3DBB18D5.9070000@mochima.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1)
Gecko/20020508 Netscape6/6.2.3
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/118
X-Sequence-Number: 135
After checking some docs on performance tuning, I'm trying to
follow Bruce Momjian (sp??) advice to set the shared_buffers
at 25% of the amount of physical memory (1GB in our server)
and 4% for the sort_mem.
When I try that, I get an error message when starting postgres,
complaining that the amount of shared memory requested exceeds
the maximum allowed by the kernel (they talk about increasing
the kernel parameter SHMMAX -- does this mean that I have to
recompile the kernel? Or is it just a "runtime" configuration
parameter that I set and on the next reboot will be taken?)
To double check if I understood correctly:
I have 1GB, so I want 256MB as shared buffers memory; each
shared buffer is 8kbytes, so I take 256M / 8k, which is 32k --
so, I uncomment the line shared_buffers in the configuration
file, and put:
shared_buffers = 32000
I don't touch anything else (max_connections keeps its default
value, but as I understand, that has nothing to do anyway...
right?)
So, what should I do?
Apologies if this is an FAQ -- I tried searching the archives,
but I get a 404 - Not Found error when following the link to
the archives for this list :-(
Thanks in advance for any comments / advice !
Carlos
--
From pgsql-performance-owner@postgresql.org Sat Oct 26 20:12:53 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id D2777475BEC
for <pgsql-performance@postgresql.org>;
Sat, 26 Oct 2002 20:12:51 -0400 (EDT)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 40039475461
for <pgsql-performance@postgresql.org>;
Sat, 26 Oct 2002 20:12:51 -0400 (EDT)
Received: from [63.195.55.98] (account <josh@agliodbs.com>)
by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9)
with HTTP id 1800543; Sat, 26 Oct 2002 17:14:35 -0700
From: "Josh Berkus" <josh@agliodbs.com>
Subject: Re: Setting shared buffers
To: Carlos Moreno <moreno@mochima.com>,
pgsql-performance@postgresql.org
X-Mailer: CommuniGate Pro Web Mailer v.3.5.9
Date: Sat, 26 Oct 2002 17:14:35 -0700
Message-ID: <web-1800543@davinci.ethosmedia.com>
In-Reply-To: <3DBB18D5.9070000@mochima.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/119
X-Sequence-Number: 136
Carlos,
> After checking some docs on performance tuning, I'm trying to
> follow Bruce Momjian (sp??) advice to set the shared_buffers
> at 25% of the amount of physical memory (1GB in our server)
> and 4% for the sort_mem.
I tend to set my shared_buffers somewhat higher, but that's a good
place to start. Be cautious about sort_mem on a server with a lot of
users; sort_mem is not shared, so make sure that you have enough that
your server could handle 1-2 sorts per concurrent user without running
out of RAM.
> When I try that, I get an error message when starting postgres,
> complaining that the amount of shared memory requested exceeds
> the maximum allowed by the kernel (they talk about increasing
> the kernel parameter SHMMAX -- does this mean that I have to
> recompile the kernel? Or is it just a "runtime" configuration
> parameter that I set and on the next reboot will be taken?)
It's easy, on Linux don't even have to reboot. Other OS's are harder.
See this very helpful page:
http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/kernel-resources.html#SYSVIPC
In fact, I tend to up my SHMMAX and SHMMALL and shared_buffers at night
on some databases, when they are doing automatic updates, and adjust
them back down during the day, when I want to prevent heavy user loads
from using up all system RAM.
> I have 1GB, so I want 256MB as shared buffers memory; each
> shared buffer is 8kbytes, so I take 256M / 8k, which is 32k --
> so, I uncomment the line shared_buffers in the configuration
> file, and put:
See the calculations on the page link above. They are more specific
than that, and I have found the numbers there to be good estimates,
maybe only 10-20% high.
-Josh Berkus
From pgsql-general-owner@postgresql.org Mon Oct 28 08:25:37 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id F0304475956
for <pgsql-general@postgresql.org>;
Mon, 28 Oct 2002 06:01:20 -0500 (EST)
Received: from news.hub.org (news.hub.org [64.49.215.80])
by postgresql.org (Postfix) with ESMTP id 90BA74758E1
for <pgsql-general@postgresql.org>;
Mon, 28 Oct 2002 06:01:20 -0500 (EST)
Received: by news.hub.org (Postfix, from userid 8)
id 32163381A35; Mon, 28 Oct 2002 06:01:18 -0500 (EST)
From: "Lars Maschke" <lars@gmeiner.de>
X-Newsgroups: comp.databases.postgresql.general,
comp.databases.postgresql.performance
Subject: [pgsql-performance] Performance Problems
Date: Mon, 28 Oct 2002 12:00:52 +0100
Organization: Hub.Org Networking Services (http://www.hub.org)
Lines: 23
Message-ID: <90iv8-n4s.ln1@server.csg.de>
X-Complaints-To: usenet@news.hub.org
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
To: pgsql-performance@postgresql.org, pgsql-general@postgresql.org
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/1186
X-Sequence-Number: 32184
Hello Newsgroup
I have trouble with postgres 7.2.3. This system works fine, but last week
every postmaster process exhausted my system to 100%. What can i do ? When I
dump all databases it has 16MB. I start my system with the following
command:
postmaster -i -c shared_buffers=1024 -c sort_mem=16384 -c
effective_cache_size=2048 -c max_connections=128 -c fsync=false -c
enable-seqscan=false -c enable_indexscan=false -c enable_tidscan=false -c
enable_sort=false -c enable_nestloop=false -c enable_hashjoin=false -c
enable-mergejoin=false -c show_parser_stats=false -c
show_planner_stats=false -c show_executor_stats=false -c
show_query_stats=false -c random_page_cost=0.99 -o -F
Can someone help me ?
--
Lars Maschke
---
Es gibt Tage, da verliert man und es gibt Tage, da gewinnen die anderen.
From pgsql-performance-owner@postgresql.org Mon Oct 28 15:47:55 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 21FC5475FC6
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 15:47:54 -0500 (EST)
Received: from web13901.mail.yahoo.com (web13901.mail.yahoo.com
[216.136.175.27])
by postgresql.org (Postfix) with SMTP id 60A384758E1
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 15:47:53 -0500 (EST)
Message-ID: <20021028204752.45338.qmail@web13901.mail.yahoo.com>
Received: from [66.241.89.7] by web13901.mail.yahoo.com via HTTP;
Mon, 28 Oct 2002 12:47:52 PST
Date: Mon, 28 Oct 2002 12:47:52 -0800 (PST)
From: James Kelty <j_kelty@yahoo.com>
Subject: Clusters
To: pgsql-performance@postgresql.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/120
X-Sequence-Number: 137
Hello,
I have a question regarding clusters. What with all
the hoop-la about Oracle RAC, the question of
clustering PostgreSQL has come up at work.
Now, I know that only one system can actually update
the database, and in a active/passive failover
situation that is ok. But! If I have lots and lots of
READS from the DB, can I cluster many low end systems
together behind an SLB? Assume that all systems have a
qlogic card, and are attached to a SAN, and that the
SAN holds the data. Can PostgreSQL be configured to
read from the SAN? Does each system have to initialize
the DB?
I think this could greatly improve the perfomance from
a application appearance, but, so far I have only seen
documentation about Oracle RAC, DB2, and MySQL using
some sort of cluster software, be it, kimberlite, Red
Hat Cluster Manager, or Vertias Cluster Server.
PostgreSQL seems to be our DB of choice, and I just
want to have a scalable solution via clustering for
it. No replication. Thanks for any thoughts!
-James
=====
James Kelty
11742 NW Valley Vista Rd.
Hillsboro, OR 97124
Cell: 541.621.5832
j_kelty@yahoo.com
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
From pgsql-performance-owner@postgresql.org Mon Oct 28 15:59:27 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 9CE3E47657C
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 15:59:26 -0500 (EST)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id 1F209476570
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 15:59:26 -0500 (EST)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 186Gyt-0008FW-00
for <pgsql-performance@postgresql.org>; Mon, 28 Oct 2002 15:59:27 -0500
Date: Mon, 28 Oct 2002 15:59:27 -0500
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Clusters
Message-ID: <20021028155927.H21128@mail.libertyrms.com>
Mail-Followup-To: Andrew Sullivan <andrew@libertyrms.info>,
pgsql-performance@postgresql.org
References: <20021028204752.45338.qmail@web13901.mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <20021028204752.45338.qmail@web13901.mail.yahoo.com>;
from j_kelty@yahoo.com on Mon, Oct 28, 2002 at 12:47:52PM -0800
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/121
X-Sequence-Number: 138
On Mon, Oct 28, 2002 at 12:47:52PM -0800, James Kelty wrote:
> together behind an SLB? Assume that all systems have a
> qlogic card, and are attached to a SAN, and that the
> SAN holds the data. Can PostgreSQL be configured to
> read from the SAN? Does each system have to initialize
> the DB?
You can't do this safely. PostgreSQL wants to control its disk.
Someone has said on the (?) -general list that he has modified the
PostgreSQL code to do this, but it makes me nervous.
The Postgres-R project is trying to do something similar, but it's
some way from production quality.
> it. No replication. Thanks for any thoughts!
I sort of wonder why "no replication" is a requirement. If you want
lots of cheap, read-only machines, why not do it with replication?
You can buy a _lot_ of x86 boxes with Promise IDE RAID and big, fast
IDE drives for the price of ORAC.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-performance-owner@postgresql.org Mon Oct 28 16:18:48 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id E8E51476061
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 16:18:46 -0500 (EST)
Received: from mailhost.nxad.com (lan.ext.nxad.com [66.250.180.254])
by postgresql.org (Postfix) with ESMTP id C6FF3475FFF
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 16:18:45 -0500 (EST)
Received: from perrin.int.nxad.com (perrin.int.nxad.com [192.168.1.251])
by mailhost.nxad.com (Postfix) with ESMTP
id 1D48D212EEB; Mon, 28 Oct 2002 13:18:47 -0800 (PST)
Received: by perrin.int.nxad.com (Postfix, from userid 1001)
id CCFDA20F02; Mon, 28 Oct 2002 13:18:46 -0800 (PST)
Date: Mon, 28 Oct 2002 13:18:46 -0800
From: Sean Chittenden <sean@chittenden.org>
To: Andrew Sullivan <andrew@libertyrms.info>, pgsql-performance@postgresql.org
Subject: Re: Clusters
Message-ID: <20021028211846.GM92719@perrin.int.nxad.com>
References: <20021028204752.45338.qmail@web13901.mail.yahoo.com>
<20021028155927.H21128@mail.libertyrms.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20021028155927.H21128@mail.libertyrms.com>
User-Agent: Mutt/1.4i
X-PGP-Key: finger seanc@FreeBSD.org
X-PGP-Fingerprint: 6CEB 1B06 BFD3 70F6 95BE 7E4D 8E85 2E0A 5F5B 3ECB
X-Web-Homepage: http://sean.chittenden.org/
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/122
X-Sequence-Number: 139
> > together behind an SLB? Assume that all systems have a qlogic
> > card, and are attached to a SAN, and that the SAN holds the
> > data. Can PostgreSQL be configured to read from the SAN? Does each
> > system have to initialize the DB?
>
> You can't do this safely. PostgreSQL wants to control its disk.
> Someone has said on the (?) -general list that he has modified the
> PostgreSQL code to do this, but it makes me nervous.
Didn't Tom say that it was possible if you had different WAL logs for
each instance? ie, just share the data directory, but everything else
has to be on a per instance basis. Check the archives, someone just
asked about this a week ago or so. -sc
--
Sean Chittenden
From pgsql-performance-owner@postgresql.org Mon Oct 28 16:32:15 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 1D5964762CD
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 16:32:15 -0500 (EST)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id 7DFA04761D3
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 16:32:14 -0500 (EST)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 186HUe-0008Uk-00
for <pgsql-performance@postgresql.org>; Mon, 28 Oct 2002 16:32:16 -0500
Date: Mon, 28 Oct 2002 16:32:16 -0500
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Clusters
Message-ID: <20021028163216.I21128@mail.libertyrms.com>
Mail-Followup-To: Andrew Sullivan <andrew@libertyrms.info>,
pgsql-performance@postgresql.org
References: <20021028204752.45338.qmail@web13901.mail.yahoo.com>
<20021028155927.H21128@mail.libertyrms.com>
<20021028211846.GM92719@perrin.int.nxad.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <20021028211846.GM92719@perrin.int.nxad.com>;
from sean@chittenden.org on Mon, Oct 28, 2002 at 01:18:46PM -0800
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/123
X-Sequence-Number: 140
On Mon, Oct 28, 2002 at 01:18:46PM -0800, Sean Chittenden wrote:
>
> Didn't Tom say that it was possible if you had different WAL logs for
> each instance? ie, just share the data directory, but everything else
> has to be on a per instance basis. Check the archives, someone just
> asked about this a week ago or so. -sc
As Sean says, check the archives. But I think the problem is bigger
than just the WAL. For instance, the pidfile is in the data
directory, so each system is going to try to overwrite that. Plus,
there's no read-only mode for Postgres, so if one of the systems
writes where it shouldn't, you'll blow everything away. I can
appreciate that some people like to play at the bare metal this way,
but it gives me ulcers ;-)
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-performance-owner@postgresql.org Mon Oct 28 16:56:19 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 2E520475F37
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 16:56:18 -0500 (EST)
Received: from l2.socialecology.com (unknown [4.42.179.131])
by postgresql.org (Postfix) with ESMTP id 87AFD475D99
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 16:56:17 -0500 (EST)
Received: from 4.42.179.151 (broccoli.socialecology.com [4.42.179.151])
by l2.socialecology.com (Postfix) with SMTP id 3B38F201EF8
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 13:56:18 -0800 (PST)
X-Mailer: UserLand Frontier 8.0.5 (Macintosh OS) (mailServer v1.1..142)
Mime-Version: 1.0
Message-Id: <74264850.1176309122@[4.42.179.151]>
X-authenticated-sender: erics
X-GSgroup: private
Date: Mon, 28 Oct 2002 13:56:14 -0800
To: pgsql-performance@postgresql.org
From: eric soroos <eric-psql@soroos.net>
Subject: Low Budget Performance
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/124
X-Sequence-Number: 141
I'm looking for some advice or benchmarks comparing low end systems for a postgres installation.
Currently, I've got postgres running on the same system as the app server accessing a single fast IDE drive. The database is on the order of 1 gig, with two main tables accounting for 98% of the data. Between the app servers and the database, I'm pretty sure that neither of the main tables are cached in memory for any significant time. I'm guessing that this is sub optimal. (The data size is 1 gig now, but I will be adding more 1 gig databases to this system in the near future) I'm planning to split this into an app server and database server.
In an ideal world, I'd throw a lot of 15k scsi/raid0+1 at this. But I don't have an ideal world budget. I've got more of an ide world budget, if that. (~1k)
I know the first order of business is to ignore the hardware and make sure that I've got all of the table scans found and turned into indexes. I'm still working on that. Are there any tools that save queries and the plans, then report on the ones that are the biggest performance drags?
But since I do software, it's obviously a hardware problem. ;>
My hardware options:
Processor:
* My low cost option is to repurpose an under used p3 with onboard IDE raid and pc133 memory. The high cost option is to get a new mid range Athalon with 266/ddr memory. Will maxing out the memory mean that whatever I don't use for client connections will be used for caching the drive system? (most likely, I will be running debian woody with a 2.4 series kernel)
Drives:
* The cost difference between IDE and SCSI is roughly a factor of 2-4x. (100 gig 7200 rpm IDE can be had for a little over $100, 10k 36 gig SCSI is about $200. Am I better off throwing twice as many (4) IDE disks at the system? Does it change if I can put each IDE drive on its own channel?
Drive Layout:
* What Drive layout?
Raid?
0 gives better latency if the controller reads from whichever gets the data first. It's unclear if IDE or software raid actually does this though.
1 Gives better throughput, at a cost to latency.
5 Like 1 but with redundancy. It's unclear if I'll be able to do this without hardware SCSI raid.
Non Raid?
I've read about seperating table spaces on different drives, so that indexes and data can be written at the same time. This advice appears to be tailored to the complexity of oracle. The ideal configuration according to this info appears to be multiple drives, all mirrored individually.
Does the write ahead logging of PG mean that no matter what indexes and data are changed, that there will be one sync to disk? Does this reduce the penalty of indexes? WAL seems to mean that to get performance out of a drive array, I'd want to use the fastest (latency/throughput) logical single image I could get, not a collection of mirrored drives.
I'd appreciate any insight.
eric
From pgsql-performance-owner@postgresql.org Mon Oct 28 17:07:13 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 9B4A0475B8E
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 17:07:11 -0500 (EST)
Received: from VL-MS-MR001.sc1.videotron.ca (relais.videotron.ca
[24.201.245.36])
by postgresql.org (Postfix) with ESMTP id 8DC4F47668E
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 17:07:05 -0500 (EST)
Received: from mochima.com ([24.202.175.133]) by VL-MS-MR001.sc1.videotron.ca
(iPlanet Messaging Server 5.2 HotFix 0.9 (built Jul 29 2002))
with ESMTP id <0H4P00HIKPG4M4@VL-MS-MR001.sc1.videotron.ca> for
pgsql-performance@postgresql.org; Mon, 28 Oct 2002 17:07:17 -0500 (EST)
Date: Mon, 28 Oct 2002 17:07:42 -0500
From: Carlos Moreno <moreno@mochima.com>
Subject: Re: Setting shared buffers
To: pgsql-performance@postgresql.org
Message-id: <3DBDB52E.500@mochima.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us, en
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827
References: <web-1800543@davinci.ethosmedia.com>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/125
X-Sequence-Number: 142
Thanks John! This is very helpful...
Just one detail I'd like to double check:
>It's easy, on Linux don't even have to reboot. Other OS's are harder.
> See this very helpful page:
>http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/kernel-resources.html#SYSVIPC
>
>In fact, I tend to up my SHMMAX and SHMMALL and shared_buffers [...]
>
According to that document, I should put the same value for the
SHMMAX and SHMMALL -- however, when I do:
cat /proc/sys/kernel/shmmax
cat /proc/sys/kernel/shmmall
on my Linux system (RedHat 7.3, soon to upgrade to 8.0), I
get different values, shmmall being shmmax divided by 16
Is that normal? What should I do? Should I follow the exact
same instructions from that document and set both to the
exact same value?
Are the default values set that way (i.e., different values)
for some strange reason, or is it that on the 2.4 kernel
the shmmall is indicated in blocks of 16 bytes or something
like that?
Thanks!
Carlos
--
From pgsql-performance-owner@postgresql.org Mon Oct 28 19:00:38 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 9BF5C475D64
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 19:00:36 -0500 (EST)
Received: from web13907.mail.yahoo.com (web13907.mail.yahoo.com
[216.136.175.70])
by postgresql.org (Postfix) with SMTP id 0BB4D47590C
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 19:00:36 -0500 (EST)
Message-ID: <20021029000038.72409.qmail@web13907.mail.yahoo.com>
Received: from [66.241.89.7] by web13907.mail.yahoo.com via HTTP;
Mon, 28 Oct 2002 16:00:38 PST
Date: Mon, 28 Oct 2002 16:00:38 -0800 (PST)
From: James Kelty <j_kelty@yahoo.com>
Subject: Re: Clusters
To: Andrew Sullivan <andrew@libertyrms.info>, pgsql-performance@postgresql.org
In-Reply-To: <20021028155927.H21128@mail.libertyrms.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/126
X-Sequence-Number: 143
I've just been very unhappy with the ease of use for
Postgres replication. Pgreplicator was a huge pain
that worked less often than not, rserv was really
unmanageable. I haven't had a chance to look at
dbmirror yet, though. Plus the replication would start
to chew up network bandwidth at some point. Of course,
so would reading from the SAN. But, then there is the
issue of system failure. If the system has to be
re-imaged, then I'd have to take a snap shot of the
master, and re-apply it to the new system. It just
seems more manageable if I can plug in a new Postgres
'instance' to the SAN, and have it up to date the
minute it starts. I know that postgres doesn't have a
'read-only' mode, but it does have the GRANT option.
So, access to the DB _can_ be controlled that way at
least.
Anyway, thanks for all the thoughts and info. If
anyone knows of some other replication service besides
the two listed above, great! Let me know!
Lemme just say, that the feature set of Postgres, when
talking strictly database, is AWESOME. Really easy to
work with, and around, but, in the HA world, it seems
a little difficult to work with.
Thanks again, Guys!
-James
--- Andrew Sullivan <andrew@libertyrms.info> wrote:
> On Mon, Oct 28, 2002 at 12:47:52PM -0800, James
> Kelty wrote:
> > together behind an SLB? Assume that all systems
> have a
> > qlogic card, and are attached to a SAN, and that
> the
> > SAN holds the data. Can PostgreSQL be configured
> to
> > read from the SAN? Does each system have to
> initialize
> > the DB?
>
> You can't do this safely. PostgreSQL wants to
> control its disk.
> Someone has said on the (?) -general list that he
> has modified the
> PostgreSQL code to do this, but it makes me nervous.
>
> The Postgres-R project is trying to do something
> similar, but it's
> some way from production quality.
>
> > it. No replication. Thanks for any thoughts!
>
> I sort of wonder why "no replication" is a
> requirement. If you want
> lots of cheap, read-only machines, why not do it
> with replication?
> You can buy a _lot_ of x86 boxes with Promise IDE
> RAID and big, fast
> IDE drives for the price of ORAC.
>
> A
>
> --
> ----
> Andrew Sullivan 204-4141
> Yonge Street
> Liberty RMS Toronto,
> Ontario Canada
> <andrew@libertyrms.info>
> M2P 2A8
> +1 416 646
> 3304 x110
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
=====
James Kelty
11742 NW Valley Vista Rd.
Hillsboro, OR 97124
Cell: 541.621.5832
j_kelty@yahoo.com
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
From pgsql-performance-owner@postgresql.org Mon Oct 28 22:27:33 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 3945647681C
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 22:27:32 -0500 (EST)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id 7B03C476819
for <pgsql-performance@postgresql.org>;
Mon, 28 Oct 2002 22:27:31 -0500 (EST)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 186N2W-0004kV-00
for <pgsql-performance@postgresql.org>; Mon, 28 Oct 2002 22:27:36 -0500
Date: Mon, 28 Oct 2002 22:27:36 -0500
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Clusters
Message-ID: <20021028222736.A18141@mail.libertyrms.com>
Mail-Followup-To: Andrew Sullivan <andrew@libertyrms.info>,
pgsql-performance@postgresql.org
References: <20021028155927.H21128@mail.libertyrms.com>
<20021029000038.72409.qmail@web13907.mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <20021029000038.72409.qmail@web13907.mail.yahoo.com>;
from j_kelty@yahoo.com on Mon, Oct 28, 2002 at 04:00:38PM -0800
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/127
X-Sequence-Number: 144
On Mon, Oct 28, 2002 at 04:00:38PM -0800, James Kelty wrote:
> that worked less often than not, rserv was really
> unmanageable.
We use PostgreSQL, Inc's eRserver, which is a commercial version of
the code in contrib/, and I can say that it is not unmanageable, but
it is some work at first. The commercial version is an improvement
on the contrib/ code, though. For us, it's worth it; but you have to
decide that for yourself.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-performance-owner@postgresql.org Tue Oct 29 01:30:20 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 72E59475FB7
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 01:30:19 -0500 (EST)
Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65])
by postgresql.org (Postfix) with ESMTP id E276C475EE2
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 01:30:17 -0500 (EST)
Received: (from root@localhost)
by www.pspl.co.in (8.11.6/8.11.6) id g9T6UHf15829
for <pgsql-performance@postgresql.org>; Tue, 29 Oct 2002 12:00:17 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g9T6UHv15824
for <pgsql-performance@postgresql.org>; Tue, 29 Oct 2002 12:00:17 +0530
From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
To: pgsql-performance@postgresql.org
Date: Tue, 29 Oct 2002 12:00:45 +0530
MIME-Version: 1.0
Subject: Re: Low Budget Performance
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3DBE786D.1218.396F01B@localhost>
In-reply-to: <74264850.1176309122@[4.42.179.151]>
X-mailer: Pegasus Mail for Windows (v4.02)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/128
X-Sequence-Number: 145
On 28 Oct 2002 at 13:56, eric soroos wrote:
> Currently, I've got postgres running on the same system as the app server accessing a single fast IDE drive. The database is on the order of 1 gig, with two main tables accounting for 98% of the data. Between the app servers and the database, I'm pretty sure that neither of the main tables are
cached in memory for any significant time. I'm guessing that this is sub optimal. (The data size is 1 gig now, but I will be adding more 1 gig databases to this system in the near future) I'm planning to split this into an app server and database server.
>
> In an ideal world, I'd throw a lot of 15k scsi/raid0+1 at this. But I don't have an ideal world budget. I've got more of an ide world budget, if that. (~1k)
>
> I know the first order of business is to ignore the hardware and make sure that I've got all of the table scans found and turned into indexes. I'm still working on that. Are there any tools that save queries and the plans, then report on the ones that are the biggest performance drags?
>
> But since I do software, it's obviously a hardware problem. ;>
>
> My hardware options:
I would say throw a lot of RAM no matter what type. Even PC133 is going to be
faster than any disk you can buy anytimes. I would say 2Gig is a nice place to
start.
A gig is not much of a database but a lot depends upon what do you do with the
data. Obviously 50 clients doing sequential scan with rows ordered in random
fashion would chew any box,..;-)
Processor does not matter much. But I would advice to split app server and
database server ASAP.
Well, IDE RAID looks like nice optio to me, but before finalising RAID config.,
I would advice to test performance and scalability with separate database
server and couple of Gigs of RAM. Because if this configuration is sufficient
for your need, probably you can choose a conservatice RAID config that would
enhance availability rather than getting every ounce of performance out of it.
As far as possible, don't compramise with storage availability.
> Does the write ahead logging of PG mean that no matter what indexes and data are changed, that there will be one sync to disk? Does this reduce the penalty of indexes? WAL seems to mean that to get performance out of a drive array, I'd want to use the fastest (latency/throughput) logical
single image I could get, not a collection of mirrored drives.
I guess RAID will take care of lot of these issues. Besides if you use volume
manager you can add partitions from different disks, effectively splitting the
IO. Of course, you can shutdown the database and symlink things to another
drive, but that's hack and nothing else. Don't do it as far as possible..
HTH
Bye
Shridhar
--
You're dead, Jim. -- McCoy, "Amok Time", stardate 3372.7
From pgsql-performance-owner@postgresql.org Tue Oct 29 01:41:36 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id D854C475B85
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 01:41:34 -0500 (EST)
Received: from relay.icomedias.com (relay.icomedias.com [62.99.232.66])
by postgresql.org (Postfix) with ESMTP id CFD34475458
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 01:41:33 -0500 (EST)
Received: from loki ([10.192.17.128])
by relay.icomedias.com (8.12.5/8.12.5) with ESMTP id g9T6fU33032225;
Tue, 29 Oct 2002 07:41:31 +0100
Content-Type: text/plain;
charset="iso-8859-1"
From: Mario Weilguni <mweilguni@sime.com>
To: eric soroos <eric-psql@soroos.net>,
pgsql-performance@postgresql.org
Subject: Re: Low Budget Performance
Date: Tue, 29 Oct 2002 08:07:50 +0100
User-Agent: KMail/1.4.3
References: <74264850.1176309122@[4.42.179.151]>
In-Reply-To: <74264850.1176309122@[4.42.179.151]>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200210290807.50625.mweilguni@sime.com>
avpresult: 0, ok, ok
X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang)
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/129
X-Sequence-Number: 146
Am Montag, 28. Oktober 2002 22:56 schrieb eric soroos:
> Raid?
> 0 gives better latency if the controller reads from whichever gets the da=
ta
> first. It's unclear if IDE or software raid actually does this though. 1
> Gives better throughput, at a cost to latency.
> 5 Like 1 but with redundancy. It's unclear if I'll be able to do this
> without hardware SCSI raid.
Just for the raid part, we've very good expiriences with Raid 10. Performs =
well and has mirroring. Avoid Raid 5 if possible, write performance will su=
ffer greatly.
Regards,
Mario Weilguni
From pgsql-general-owner@postgresql.org Tue Oct 29 08:38:23 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP
id 03BFA4765BA; Tue, 29 Oct 2002 08:38:22 -0500 (EST)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP
id B08374765B0; Tue, 29 Oct 2002 08:38:20 -0500 (EST)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 186WZc-000590-00; Tue, 29 Oct 2002 08:38:24 -0500
Date: Tue, 29 Oct 2002 08:38:24 -0500
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org, pgsql-general@postgresql.org
Subject: Re: [pgsql-performance] Performance Problems
Message-ID: <20021029083824.C18292@mail.libertyrms.com>
Mail-Followup-To: Andrew Sullivan <andrew@libertyrms.info>,
pgsql-performance@postgresql.org, pgsql-general@postgresql.org
References: <90iv8-n4s.ln1@server.csg.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <90iv8-n4s.ln1@server.csg.de>;
from lars@gmeiner.de on Mon, Oct 28, 2002 at 12:00:52PM +0100
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/1271
X-Sequence-Number: 32269
On Mon, Oct 28, 2002 at 12:00:52PM +0100, Lars Maschke wrote:
> Can someone help me ?
Maybe. You need to tell us what "exhausted your system" means. Did
it crash? Were you swapping? Were your CPUs pegged?
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-performance-owner@postgresql.org Tue Oct 29 08:43:41 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 90AED476032
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 08:43:40 -0500 (EST)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by postgresql.org (Postfix) with ESMTP id 0550E475FFF
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 08:43:40 -0500 (EST)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g9TDhchR021027;
Tue, 29 Oct 2002 08:43:38 -0500 (EST)
To: Sean Chittenden <sean@chittenden.org>
Cc: Andrew Sullivan <andrew@libertyrms.info>, pgsql-performance@postgresql.org
Subject: Re: Clusters
In-reply-to: <20021028211846.GM92719@perrin.int.nxad.com>
References: <20021028204752.45338.qmail@web13901.mail.yahoo.com>
<20021028155927.H21128@mail.libertyrms.com>
<20021028211846.GM92719@perrin.int.nxad.com>
Comments: In-reply-to Sean Chittenden <sean@chittenden.org>
message dated "Mon, 28 Oct 2002 13:18:46 -0800"
Date: Tue, 29 Oct 2002 08:43:38 -0500
Message-ID: <21026.1035899018@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/131
X-Sequence-Number: 148
Sean Chittenden <sean@chittenden.org> writes:
> together behind an SLB? Assume that all systems have a qlogic
> card, and are attached to a SAN, and that the SAN holds the
> data. Can PostgreSQL be configured to read from the SAN? Does each
> system have to initialize the DB?
>>
>> You can't do this safely. PostgreSQL wants to control its disk.
>> Someone has said on the (?) -general list that he has modified the
>> PostgreSQL code to do this, but it makes me nervous.
> Didn't Tom say that it was possible if you had different WAL logs for
> each instance?
I said no such thing. I said it will not work, period.
regards, tom lane
From pgsql-performance-owner@postgresql.org Tue Oct 29 09:26:36 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id B92B2475458
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 09:26:34 -0500 (EST)
Received: from batch3.csd.uwm.edu (batch3.csd.uwm.edu [129.89.7.226])
by postgresql.org (Postfix) with ESMTP id 22B86475425
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 09:26:34 -0500 (EST)
Received: from alpha3.csd.uwm.edu (daemon@alpha3.csd.uwm.edu [129.89.7.203]
(may be forged))
by batch3.csd.uwm.edu (8.12.6/8.12.6) with ESMTP id g9TEQcI5022972
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 08:26:38 -0600 (CST)
Received: (from kklatt@localhost)
by alpha3.csd.uwm.edu (8.12.6/8.12.6) id g9TEQbJx014363
for pgsql-performance@postgresql.org;
Tue, 29 Oct 2002 08:26:37 -0600 (CST)
Date: Tue, 29 Oct 2002 08:26:37 -0600
From: Kenny H Klatt <kklatt@alpha3.csd.uwm.edu>
To: pgsql-performance@postgresql.org
Subject: Possible OT - Benchmark test for 7.3 Beta 3
Message-ID: <20021029142637.GA11684@alpha3.csd.uwm.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.25i
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/132
X-Sequence-Number: 149
Hi:
Not being too versed with postgres and beta tests, is there
a place or person who would review the results of the benchmark test for 7.3?
kklatt@uwm.edu
From pgsql-performance-owner@postgresql.org Tue Oct 29 10:15:54 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 79618475F22
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 10:15:52 -0500 (EST)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id D35B8475EEB
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 10:15:51 -0500 (EST)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 186Y60-0006oD-00
for <pgsql-performance@postgresql.org>; Tue, 29 Oct 2002 10:15:56 -0500
Date: Tue, 29 Oct 2002 10:15:56 -0500
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Possible OT - Benchmark test for 7.3 Beta 3
Message-ID: <20021029101556.B25851@mail.libertyrms.com>
Mail-Followup-To: Andrew Sullivan <andrew@libertyrms.info>,
pgsql-performance@postgresql.org
References: <20021029142637.GA11684@alpha3.csd.uwm.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <20021029142637.GA11684@alpha3.csd.uwm.edu>;
from kklatt@alpha3.csd.uwm.edu on Tue, Oct 29, 2002 at 08:26:37AM
-0600
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/133
X-Sequence-Number: 150
On Tue, Oct 29, 2002 at 08:26:37AM -0600, Kenny H Klatt wrote:
> Hi:
> Not being too versed with postgres and beta tests, is there
> a place or person who would review the results of the benchmark test for 7.3?
I'm unaware of anyone having done a benchmark. If you know of one,
please share it with all of us.
A
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-performance-owner@postgresql.org Tue Oct 29 11:58:42 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 8ED52476083
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 11:58:39 -0500 (EST)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id CB0EC476487
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 11:58:25 -0500 (EST)
Received: from [63.195.55.98] (account <josh@agliodbs.com>)
by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9)
with HTTP id 1803601 for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 09:00:27 -0800
From: "Josh Berkus" <josh@agliodbs.com>
Subject: Re: Low Budget Performance
To: pgsql-performance@postgresql.org
X-Mailer: CommuniGate Pro Web Mailer v.3.5.9
Date: Tue, 29 Oct 2002 09:00:27 -0800
Message-ID: <web-1803601@davinci.ethosmedia.com>
In-Reply-To: <3DBE786D.1218.396F01B@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/134
X-Sequence-Number: 151
Eric,
> > Currently, I've got postgres running on the same system as the app
> server accessing a single fast IDE drive. The database is on the
> order of 1 gig, with two main tables accounting for 98% of the data.
> Between the app servers and the database, I'm pretty sure that
> neither of the main tables are
> cached in memory for any significant time. I'm guessing that this is
> sub optimal. (The data size is 1 gig now, but I will be adding more 1
> gig databases to this system in the near future) I'm planning to
> split this into an app server and database server.
One gig is a large database for a single IDE drive -- especially with
multiple client connections.
> > In an ideal world, I'd throw a lot of 15k scsi/raid0+1 at this.
> But I don't have an ideal world budget. I've got more of an ide
> world budget, if that. (~1k)
Well, no matter how many performance tricks you add in, the speed will
be limited by the hardware. Make sure that your client/employer knows
that *before* they complain about the speed.
> > I know the first order of business is to ignore the hardware and
> make sure that I've got all of the table scans found and turned into
> indexes. I'm still working on that. Are there any tools that save
> queries and the plans, then report on the ones that are the biggest
> performance drags?
Not exactly. If you enable Postgres 7.2 STATISTICS, you can get a lot
of information about which indexes are being used, which are not, and
which tables are having a lot of table scans. A tool like you
describe would be really, really useful -- in fact, if anyone wrote
one, I'm sure you could sell it for $$$$.
> > But since I do software, it's obviously a hardware problem. ;>
<grin>
Actually, your best option for the hardware is to test what portion of
the hardware is bottlenecking your performance, and address that. But
first:
> Well, IDE RAID looks like nice optio to me, but before finalising
> RAID config.,
> I would advice to test performance and scalability with separate
> database
> server and couple of Gigs of RAM.
I'm not convinced that current IDE RAID actually improves database disk
throughput -- there's a lot of overhead in the one controller I tried
(Promise). Does anyone have some statistics they can throw at me?
A cheaper and easier method, involving 3-4 disks:
Channel 1, Disk 1: Operating System, Swap, and PostgreSQL log
Channel 1, Disk 2: WAL Files
Channel 2, Disk 1: Database
Channel 2, Disk 2 (optional): 2nd database data
*however*, if you have multiple databases being simulteaneously
accessesed, you will want to experiment with shuffling around the
databases and WAL files to put them on different disks. The principle
is to divide the disk tasks that are simultaenous ammonng as many disks
as possible; thus the WAL files always do better on a different disk
and channel than the database.
> > Does the write ahead logging of PG mean that no matter what indexes
> and data are changed, that there will be one sync to disk? Does this
> reduce the penalty of indexes?
In a word: No. Depending on the size of the update, there may be
multiple synchs. And indexes do carry a significant penalty on large
updates; just try runninng 10,000 updates to an indexed column as one
transaction, and the penalty will be obvious. In fact, for my data
load procedures, I tend to drop and re-create indexes.
> WAL seems to mean that to get
> performance out of a drive array, I'd want to use the fastest
> (latency/throughput) logical
> single image I could get, not a collection of mirrored drives.
Mirrored drives are different than RAID. However, you are correct
that the redundancy/fail-over factor in some RAID and Mirroring comes
at a performance penalty.
But you need to determine where you are actually losing time.
Assuming that your tables are correctly indexed, your files are
distributed, and your database is VACUUM FULL ANALYZed, and your
postgresql.conf configured for optimum use of your exisiting memory,
then here's what you do (assuming that you use Linux)
1. From a workstation, open 2 terminal windows on the server. In #1,
run "vmstat 3", in the other "top"
2. Have your users pound on the application, trying all of the most
complicated (and slow) operations in the app. More users is better,
for this test.
3. Watch Vmstat and Top. What you're looking for is:
a) Is the processor at 75% or above? If so, you either need a faster
processor or more efficient queries
b) Is the system using 80-100% of the RAM which you allocated it? If
so, add more RAM and increase the Postgresql.conf memory variables.
c) Is the system using Swap memory? if so, either add more RAM, or
*decrease* the postgresql.conf memory variables.
d) Are RAM and Processor at less than 50%, but the Disk I/O reaches a
maximum number and stays there for minutes? Then your disk channel is
flooded, and you cannot improve performance except by either improving
your queries so the pull less rows, or adding more/faster disk
capacity.
The above process, while drawn-out, will help you avoid spending a lot
of money on, for example, RAM that won't make a difference.
-Josh Berkus
From pgsql-performance-owner@postgresql.org Tue Oct 29 12:08:31 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 3AA5F475DBC
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 12:08:29 -0500 (EST)
Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250])
by postgresql.org (Postfix) with ESMTP id 82CE0475D70
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 12:08:28 -0500 (EST)
Received: from [63.195.55.98] (account <josh@agliodbs.com>)
by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9)
with HTTP id 1803616; Tue, 29 Oct 2002 09:10:31 -0800
From: "Josh Berkus" <josh@agliodbs.com>
Subject: Re: Low Budget Performance
To: Mario Weilguni <mweilguni@sime.com>,
eric soroos <eric-psql@soroos.net>, pgsql-performance@postgresql.org
X-Mailer: CommuniGate Pro Web Mailer v.3.5.9
Date: Tue, 29 Oct 2002 09:10:31 -0800
Message-ID: <web-1803616@davinci.ethosmedia.com>
In-Reply-To: <200210290807.50625.mweilguni@sime.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/135
X-Sequence-Number: 152
Mario,
> Just for the raid part, we've very good expiriences with Raid 10.
> Performs well and has mirroring. Avoid Raid 5 if possible, write
> performance will suffer greatly.
Out of curiousity, what is it with RAID 5? I've encountered the poor
write performance too ... any idea why?
-Josh
From pgsql-performance-owner@postgresql.org Tue Oct 29 12:31:07 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id B8666476161
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 12:31:05 -0500 (EST)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id 1CD12476139
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 12:31:05 -0500 (EST)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 186aCs-0000RQ-00
for <pgsql-performance@postgresql.org>; Tue, 29 Oct 2002 12:31:10 -0500
Date: Tue, 29 Oct 2002 12:31:10 -0500
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Low Budget Performance
Message-ID: <20021029123110.M25851@mail.libertyrms.com>
Mail-Followup-To: Andrew Sullivan <andrew@libertyrms.info>,
pgsql-performance@postgresql.org
References: <200210290807.50625.mweilguni@sime.com>
<web-1803616@davinci.ethosmedia.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <web-1803616@davinci.ethosmedia.com>;
from josh@agliodbs.com on Tue, Oct 29, 2002 at 09:10:31AM -0800
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/136
X-Sequence-Number: 153
On Tue, Oct 29, 2002 at 09:10:31AM -0800, Josh Berkus wrote:
>
> Out of curiousity, what is it with RAID 5? I've encountered the poor
> write performance too ... any idea why?
It largely depends on the controller and te implementation. It has
to do with the cost of calculating the checksum. If the
implementation of that is inefficient, the writes become inefficient.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-performance-owner@postgresql.org Tue Oct 29 13:43:41 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 42A2F475DB4
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 13:43:40 -0500 (EST)
Received: from l2.socialecology.com (unknown [4.42.179.131])
by postgresql.org (Postfix) with ESMTP id 8CEEA475CED
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 13:43:39 -0500 (EST)
Received: from 4.42.179.151 (broccoli.socialecology.com [4.42.179.151])
by l2.socialecology.com (Postfix) with SMTP id 6A2A9204439
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 10:43:38 -0800 (PST)
X-Mailer: UserLand Frontier 8.0.5 (Macintosh OS) (mailServer v1.1..142)
Mime-Version: 1.0
Message-Id: <78755096.1176234283@[4.42.179.151]>
X-authenticated-sender: erics
In-reply-to: <web-1803601@davinci.ethosmedia.com>
Date: Tue, 29 Oct 2002 10:43:33 -0800
To: pgsql-performance@postgresql.org
From: eric soroos <eric-psql@soroos.net>
Subject: Re: Low Budget Performance
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/137
X-Sequence-Number: 154
Josh,
Thanks for the reply.
> One gig is a large database for a single IDE drive -- especially with
> multiple client connections.
That's good to know.
Is a scsi system that much better? Looking at prices, scsi is 1/2 the capacity and double the price for the 80 gig 7200rpm ide vs 36 gig 10k rpm scsi. Assuming that I'll never run out of space before running out of performance, I can dedicate 2x the number of ide drives to the problem.
> > Well, IDE RAID looks like nice optio to me, but before finalising
> > RAID config.,
> > I would advice to test performance and scalability with separate
> > database
> > server and couple of Gigs of RAM.
>
> I'm not convinced that current IDE RAID actually improves database disk
> throughput -- there's a lot of overhead in the one controller I tried
> (Promise). Does anyone have some statistics they can throw at me?
All of the benchmarks that I've seen show that IDE raid is good for large operations, but for random seek and small data transfers, you don't get anywhere near the expected scaling.
> A cheaper and easier method, involving 3-4 disks:
>
> Channel 1, Disk 1: Operating System, Swap, and PostgreSQL log
> Channel 1, Disk 2: WAL Files
> Channel 2, Disk 1: Database
> Channel 2, Disk 2 (optional): 2nd database data
With IDE, I think I can manage to put each drive on a seperate channel. I've either got one extra controller onboard, or I can add a 4 channel pci card. From what I've read, this is one of the more important factors in IDE performance.
> *however*, if you have multiple databases being simulteaneously
> accessesed, you will want to experiment with shuffling around the
> databases and WAL files to put them on different disks. The principle
> is to divide the disk tasks that are simultaenous ammonng as many disks
> as possible; thus the WAL files always do better on a different disk
> and channel than the database.
That's what I've read about database disk system design. Reduce spindle contention by using lots of drives. (especially in Philip Greenspun's book, but he's talking about 2x7 drives as a minimal configuration and 2x21 as ideal for larger systems. And when licensing is more expensive than that sort of drive system, it's all roundoff error.)
So, assuming that I have three databases with roughly equal load on them, does it make sense to partition them like:
disk 0: os/swap/log/backup staging
disk 1: WAL 1, DB 2
disk 2: WAL 2, DB 3
disk 3: WAL 3, DB 1
Or, in a slightly bigger drive system split 2 ways then mirrored.
disk 0: os etc
Disk 1,2: WAL 1, DB 2
Disk 3,4: WAL 2, DB 1
From an admin point of view, would this be done with alternate locations, symlinks, or multiple concurrent pg processes?
> > > Does the write ahead logging of PG mean that no matter what indexes
> > and data are changed, that there will be one sync to disk? Does this
> > reduce the penalty of indexes?
>
> In a word: No. Depending on the size of the update, there may be
> multiple synchs. And indexes do carry a significant penalty on large
> updates; just try runninng 10,000 updates to an indexed column as one
> transaction, and the penalty will be obvious. In fact, for my data
> load procedures, I tend to drop and re-create indexes.
Most of my update procedures are single row updates, with the exception being things that are already background tasks that the user doesn't notice the difference between 10 and 20 sec. So maybe I'm lucky there.
> Mirrored drives are different than RAID. However, you are correct
> that the redundancy/fail-over factor in some RAID and Mirroring comes
> at a performance penalty.
From howtos I've seen, there _can_ be a speed boost with mirroring on read using the linux kernel raid 1. Write performance suffers though.
> But you need to determine where you are actually losing time.
That looks like it will get me started.
eric
From pgsql-performance-owner@postgresql.org Tue Oct 29 15:13:46 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id C1AAE476272
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 15:13:44 -0500 (EST)
Received: from mail.libertyrms.com (unknown [209.167.124.227])
by postgresql.org (Postfix) with ESMTP id 48DCB4761B2
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 15:13:44 -0500 (EST)
Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3
(Debian))
id 186ck9-0001xC-00
for <pgsql-performance@postgresql.org>; Tue, 29 Oct 2002 15:13:41 -0500
Date: Tue, 29 Oct 2002 15:13:41 -0500
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Low Budget Performance
Message-ID: <20021029151341.S25851@mail.libertyrms.com>
Mail-Followup-To: Andrew Sullivan <andrew@libertyrms.info>,
pgsql-performance@postgresql.org
References: <web-1803601@davinci.ethosmedia.com>
<78755096.1176234283@[4.42.179.151]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <78755096.1176234283@[4.42.179.151]>;
from eric-psql@soroos.net on Tue, Oct 29, 2002 at 10:43:33AM -0800
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/138
X-Sequence-Number: 155
On Tue, Oct 29, 2002 at 10:43:33AM -0800, eric soroos wrote:
> Is a scsi system that much better? Looking at prices, scsi is 1/2
> the capacity and double the price for the 80 gig 7200rpm ide vs 36
> gig 10k rpm scsi. Assuming that I'll never run out of space before
> running out of performance, I can dedicate 2x the number of ide
> drives to the problem.
SCSI is dramatically better at using the interface. It is much
smarter about, for instance, handling multiple disks at the same
time; and it requires less attention from the CPU.
That said, if you have enough high speed IDE controllers and disks,
you'll probably beat an older SCSI system. And you can't beat the
price/performance of IDE RAID. We use it for some applications.
Note also that you get better RAID controllers from SCSI vendors,
just because it's the official high speed offering. The Promise IDE
RAID is nice, but it sure isn't as fast as the latest SCSI RAID
controllers. (We have also found that there's some overhead in the
IDE RAID. It was better under FreeBSD than I'm now experiencing
under Linux. But that might just be my prejudices showing!)
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
From pgsql-performance-owner@postgresql.org Tue Oct 29 16:09:50 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 450EB47683F
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 16:09:49 -0500 (EST)
Received: from lakemtao03.cox.net (lakemtao03.cox.net [68.1.17.242])
by postgresql.org (Postfix) with ESMTP id 7FDB04767AD
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 16:09:41 -0500 (EST)
Received: from localhost.localdomain ([68.11.66.83]) by lakemtao03.cox.net
(InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP
id <20021029210943.RGZU16428.lakemtao03.cox.net@localhost.localdomain>
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 16:09:43 -0500
Subject: Re: Low Budget Performance
From: Ron Johnson <ron.l.johnson@cox.net>
To: pgsql-performance@postgresql.org
In-Reply-To: <20021029123110.M25851@mail.libertyrms.com>
References: <200210290807.50625.mweilguni@sime.com>
<web-1803616@davinci.ethosmedia.com>
<20021029123110.M25851@mail.libertyrms.com>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8
Date: 29 Oct 2002 15:09:41 -0600
Message-Id: <1035925781.11600.42.camel@haggis>
Mime-Version: 1.0
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/139
X-Sequence-Number: 156
On Tue, 2002-10-29 at 11:31, Andrew Sullivan wrote:
> On Tue, Oct 29, 2002 at 09:10:31AM -0800, Josh Berkus wrote:
> >
> > Out of curiousity, what is it with RAID 5? I've encountered the poor
> > write performance too ... any idea why?
>
> It largely depends on the controller and te implementation. It has
> to do with the cost of calculating the checksum. If the
> implementation of that is inefficient, the writes become inefficient.
A high-quality smart controller with lots of cache RAM definitely
negates the RAID5 performance issues.
(Of course, I'm referring to enterprise-level rack-mounted h/w
that costs big bucks...)
--
+------------------------------------------------------------+
| Ron Johnson, Jr. mailto:ron.l.johnson@cox.net |
| Jefferson, LA USA http://members.cox.net/ron.l.johnson |
| |
| "they love our milk and honey, but preach about another |
| way of living" |
| Merle Haggard, "The Fighting Side Of Me" |
+------------------------------------------------------------+
From pgsql-performance-owner@postgresql.org Tue Oct 29 16:57:30 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id 4FEEF475D3B
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 16:57:29 -0500 (EST)
Received: from mail.taxrefund.com (mail.internalrevenueservice.com
[216.88.69.2]) by postgresql.org (Postfix) with ESMTP id C440E475CED
for <pgsql-performance@postgresql.org>;
Tue, 29 Oct 2002 16:57:28 -0500 (EST)
Received: from treesp1 [10.10.2.123] by mail.taxrefund.com
(SMTPD32-7.10) id A58F680036; Tue, 29 Oct 2002 16:02:55 -0600
From: "Robert J. Sanford, Jr." <rsanford@trefs.com>
To: <pgsql-performance@postgresql.org>
Subject: Re: Low Budget Performance
Date: Tue, 29 Oct 2002 15:57:29 -0600
Message-ID: <MFEOIGBMIEJBAEKEIKKECEOACKAA.rsanford@trefs.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <1035925781.11600.42.camel@haggis>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/140
X-Sequence-Number: 157
> -----Original Message-----
> From: pgsql-performance-owner@postgresql.org
> [mailto:pgsql-performance-owner@postgresql.org]
> On Behalf Of Ron Johnson
> Sent: Tuesday, October 29, 2002 3:10 PM
> To: pgsql-performance@postgresql.org
> Subject: Re: [pgsql-performance] Low Budget Performance
>
>
> On Tue, 2002-10-29 at 11:31, Andrew Sullivan wrote:
> > On Tue, Oct 29, 2002 at 09:10:31AM -0800, Josh Berkus
> > wrote:
> > >
> > > Out of curiousity, what is it with RAID 5? I've
> > > encountered the poor write performance too ... any
> > > idea why?
> >
> > It largely depends on the controller and the
> > implementation. It has to do with the cost of
> > calculating the checksum. If the implementation of
> > that is inefficient, the writes become inefficient.
>
> A high-quality smart controller with lots of cache RAM
> definitely negates the RAID5 performance issues.
>
> (Of course, I'm referring to enterprise-level rack-mounted
> h/w that costs big bucks...)
Only if you buy it new. EBay has some great deals these days. My company
just purchased a very nice Quad Xeon w/ 2GB RAM and last year's high-end
PERC RAID controller for under $5K. The external drive array was a bit more
expensive but that is an optional purchase. The 3x9GB SCSI drives that came
with the machine should be more than sufficient to run a greater than small
database server. If you don't want to spend $5K there are Dual Xeon machines
with less RAM and not quite so nice RAID controllers that you can get in the
$2.5K to $3.5K range.
rjsjr
From pgsql-performance-owner@postgresql.org Wed Oct 30 20:38:52 2002
Received: from localhost (postgresql.org [64.49.215.8])
by postgresql.org (Postfix) with ESMTP id D4380475A1E
for <pgsql-performance@postgresql.org>;
Wed, 30 Oct 2002 20:38:50 -0500 (EST)
Received: from new-smtp2.ihug.com.au (new-smtp2.ihug.com.au [203.109.250.28])
by postgresql.org (Postfix) with ESMTP id E3236474E5C
for <pgsql-performance@postgresql.org>;
Wed, 30 Oct 2002 20:38:49 -0500 (EST)
Received: from p17-tnt2.mel.ihug.com.au (postgresql.org) [203.173.164.17]
by new-smtp2.ihug.com.au with esmtp (Exim 3.22 #1 (Debian))
id 1874II-0006NR-00; Thu, 31 Oct 2002 12:38:47 +1100
Message-ID: <3DC089A4.7B6D3B9E@postgresql.org>
Date: Thu, 31 Oct 2002 12:38:45 +1100
From: Justin Clift <justin@postgresql.org>
X-Mailer: Mozilla 4.79 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: josh@agliodbs.com
Cc: pgsql-performance@postgresql.org
Subject: Re: PG_Autotune 0.1
References: <200210151100.58044.josh@agliodbs.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by AMaViS new-20020517
X-Archive-Number: 200210/141
X-Sequence-Number: 158
Josh Berkus wrote:
>
> Folks, Justin,
>
> Hey, I've been tinkering with PG_autotune in an effort to make it usable on my
> installation.
> http://gborg.postgresql.org/project/pgautotune/projdisplay.php
>
> First off, thank you Justin for getting inspired and writing the starter
> version. This is something that would probably have remained *way* down the
> Postgres TODO list, were it not for you.
Thats cool. :)
> Since it's such a great idea, I'd like to make it bulletproof so that it can
> become part of the standard Postgres distribution. I'm hoping that people
> on this list can help.
Hopefully. :)
> Problems, Bugs, & Suggestions:
> 1) The program makes the assumption that the Postgres superuser is named
> "pgsql", forcing me to do a search-and-replace on the source to make it work
> at all on my system, where the superuser is named "postgres". This should
> be a configuration option. Places I've identified where this is an issue:
> a. the connection to the "metrics" database, b. the calls to Postgres
> executables (which are also sometimes made as the console user, causing them
> to fail if you run the program as "root").
Good point. It was developed on FreeBSD, and the PostgreSQL superuser
on FreeBSD (using the default installation method) is called "pgsql".
On at least Solaris and Linux the most common name for the superuser
appears to be "postgres".
> 2) The program also assumes that all Postgres binaries are symlinked in
> /usr/local/bin. Since this symlinking isn't done by Postgres-make-install,
> wouldn't it be better to reference $PGHOME/bin?
Yep.
> 3) For that matter, it would be nice if the program would test $PGDATA and
> $PGHOME, and prompt the user if they are empty.
Good point.
> 4) The shell scripts need to have error-checking so that they exit if anything
> blows up. I can write this if Justin can explain what the shell scripts are
> supposed to do, exactly, and where errors are acceptable.
Ok, no problem.
There are really only two shell scripts and a template. Forgot to
include the template i n the downloadable version. :( Have to fix that
soon.
The shell scripts all reside in the $PGDATA directory and work like
this:
1) The main shell script is called by the pg_autotune executable, and
all it does is adjust the settings for a couple of variables in the
postgresql.conf file. At present the variables it adjusts are
max_connections, sort_mem, vacuum_mem and shared_buffers. Others could
definitely be added in, but this is a start. The method used for
adjusting the variables is to have a template postgresql.conf file with
tokens for the settings to be replaced, and then parsing them with sed
or awk or something. Can't remember offhand how, but I do remember it
was a quick&ugly hack. :-/ Needs to be done properly down the track.
2) Restarts the PostgreSQL database (pg_ctl stop; pg_ctl start). Sure,
long approach, but it works reliably. :)
3) The second shell script exists only to catch the output from the
"pg_ctl start" command and then exit, as if you don't pipe the output to
a valid process then the "pg_ctl start" doesn't appear to work
properly. This was the only way I could see that would consistently
work and not leave open filehandles around.
> 5) We need installation docs. I can write these. Sometime soon, really!
Cool. Lets do it. :)
> Questions & Suggestions for Enhancement:
>
> 6) The shared_buffers param is capped at 500. Isn't this awfully low for a
> production server? What's the logic here?
They're just values that were ok to test with whilst making the program
work.
> 7) Any ideas on how to get around/adjust memory maximums for the host OS?
> This is easy on Linux, but other *nixes are not so easy.
Probably the best approach initially is to detect memory failure related
errors where possible and then advise the user how to adjust them.
Pointing to the relevant section of the PostgreSQL manual in the
PostgreSQL Interactive Docs might be the way to go here.
> 8) What will be the difficulties in expanding the script to adjust more
> Postgresql.conf params, such as checkpoint_segments? Can we use feedback
> from the log to adjust these?
Good idea. As this tool is a reasonably brute force tester, the more
parameters added could increase the time needed for testing, unless
someone comes up with some bright ideas. :)
> 9) I *love* the idea of letting the benchmarking script run custom queries.
> However, I would dearly like to expand it, letting it randomly grab from a
> list of 10 custom queries entered by the user into a file or files. This
> would allow the user to create a realistic mix of simple and complex queries,
> including some data manipulation and procedures.
Hey good idea. The section of the code in place for letting the user
run custom queries isn't yet finished, but it wouldn't take a
half-decent coder long to do.
> 10) Can we eventually adjust the program to get feedback from system tools and
> give the user hints on hardware limitations? For example, have the program
> test if, at maximum settings, queries are slow but CPU and RAM are only 10%
> utilized and tell the user "Your hard drives are probably too slow"?
Very good thought, and very worthwhile. Any idea how to start with it?
> I can help with: documentation, shell scripting, Linux system issues. Other
> volunteers to help?
Hopefully.
:)
Regards and best wishes,
Justin Clift
> --
> -Josh Berkus
> Aglio Database Solutions
> San Francisco
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
|