=== WITH PATCH === query | rows | avg_exe_time | std_dev_exe_time | min_exe_time | max_exe_time ---------------------------------------------------------------------+---------+--------------+------------------+--------------+-------------- select count(*) from fperf1 | 1 | 141.8686 | 4.4668353500495 | 138.903 | 152.241 select c2, avg(c1) from fperf1 group by c2 having count(*) < 333334 | 2 | 405.7661 | 11.9403142844368 | 400.689 | 439.675 select c2, sum(c1) from fperf1 group by c2 | 3 | 363.2299 | 4.29278180851687 | 354.815 | 369.739 select c3, avg(c1), sum(c2) from fperf1 group by c3 | 5 | 454.4478 | 3.98680590057494 | 447.248 | 457.955 select c4, avg(c1), sum(c2) from fperf1 group by c4 | 10 | 501.0197 | 5.26951028823454 | 491.726 | 508.574 select c5, avg(c1), sum(c2) from fperf1 group by c5 | 100 | 490.0783 | 5.64261263462349 | 480.78 | 496.662 select c6, avg(c1), sum(c2) from fperf1 group by c6 | 1000 | 582.6842 | 9.9196984474776 | 564.425 | 592.69 select c1%1, avg(c1), sum(c2) from fperf1 group by c1%1 | 1 | 901.1682 | 9.58382273302904 | 888.383 | 923.386 select c1%10, avg(c1), sum(c2) from fperf1 group by c1%10 | 10 | 1032.1959 | 6.89087326268629 | 1018.598 | 1045.423 select c1%100, avg(c1), sum(c2) from fperf1 group by c1%100 | 100 | 1076.3834 | 11.1022883947539 | 1061.305 | 1093.892 select c1%1000, avg(c1), sum(c2) from fperf1 group by c1%1000 | 1000 | 1113.6001 | 11.2143472634172 | 1092.863 | 1133.007 select c1%10000, avg(c1), sum(c2) from fperf1 group by c1%10000 | 10000 | 1182.1374 | 32.5953859659133 | 1148.961 | 1231.296 select c1%100000, avg(c1), sum(c2) from fperf1 group by c1%100000 | 100000 | 1467.1811 | 14.3535175437048 | 1443.95 | 1485.645 select c1%1000000, avg(c1), sum(c2) from fperf1 group by c1%1000000 | 1000000 | 5466.2306 | 633.367848489717 | 5127.339 | 7248.381 (14 rows) === WITHOUT PATCH === query | rows | avg_exe_time | std_dev_exe_time | min_exe_time | max_exe_time ---------------------------------------------------------------------+---------+--------------+------------------+--------------+-------------- select count(*) from fperf1 | 1 | 1674.5339 | 27.1549108570754 | 1637.345 | 1725.057 select c2, avg(c1) from fperf1 group by c2 having count(*) < 333334 | 2 | 2467.8368 | 22.606929678949 | 2437.674 | 2506.438 select c2, sum(c1) from fperf1 group by c2 | 3 | 2387.39 | 34.3686766983568 | 2350.396 | 2444.313 select c3, avg(c1), sum(c2) from fperf1 group by c3 | 5 | 2702.3344 | 28.0312843452488 | 2665.317 | 2746.862 select c4, avg(c1), sum(c2) from fperf1 group by c4 | 10 | 2850.9818 | 42.5758532759606 | 2813.562 | 2946.991 select c5, avg(c1), sum(c2) from fperf1 group by c5 | 100 | 3519.9419 | 34.0792701064716 | 3473.709 | 3583.043 select c6, avg(c1), sum(c2) from fperf1 group by c6 | 1000 | 3030.4009 | 27.6855914248393 | 3008.713 | 3094.22 select c1%1, avg(c1), sum(c2) from fperf1 group by c1%1 | 1 | 2577.7204 | 32.2177922141319 | 2551.266 | 2644.744 select c1%10, avg(c1), sum(c2) from fperf1 group by c1%10 | 10 | 2615.7951 | 19.8623889434851 | 2592.613 | 2646.696 select c1%100, avg(c1), sum(c2) from fperf1 group by c1%100 | 100 | 2611.5906 | 26.5091683017013 | 2578.586 | 2664.936 select c1%1000, avg(c1), sum(c2) from fperf1 group by c1%1000 | 1000 | 2624.3797 | 18.1034474559238 | 2602.988 | 2665.453 select c1%10000, avg(c1), sum(c2) from fperf1 group by c1%10000 | 10000 | 2702.8801 | 26.5523021159207 | 2663.27 | 2742.34 select c1%100000, avg(c1), sum(c2) from fperf1 group by c1%100000 | 100000 | 3019.5939 | 34.1965254942112 | 2978.507 | 3076.033 select c1%1000000, avg(c1), sum(c2) from fperf1 group by c1%1000000 | 1000000 | 4555.6334 | 46.5314774013736 | 4496.797 | 4647.332 (14 rows)