pwj_regress_test.out

application/octet-stream

Filename: pwj_regress_test.out
Type: application/octet-stream
Part: 0
Message: Re: Partition-wise join for join between (declaratively) partitioned tables
with patch:
 explain analyse  select * from prt, prt2 where prt.a = prt2.b and prt2.a < 1000;
                                                                  QUERY PLAN                                                                   
-----------------------------------------------------------------------------------------------------------------------------------------------
 Append  (cost=18672.61..479932.18 rows=25638264 width=16) (actual time=289.636..14544.398 rows=26941347 loops=1)
   ->  Hash Join  (cost=18672.61..207752.86 rows=13513011 width=16) (actual time=289.635..5645.654 rows=14557384 loops=1)
         Hash Cond: (prt2_p1.b = prt_p1.a)
         ->  Index Scan using p211_idx on prt2_p1  (cost=0.42..1160.46 rows=47991 width=8) (actual time=0.046..116.888 rows=47719 loops=1)
               Index Cond: (a < 1000)
         ->  Hash  (cost=10003.75..10003.75 rows=693475 width=8) (actual time=287.532..287.532 rows=693475 loops=1)
               Buckets: 1048576  Batches: 1  Memory Usage: 35281kB
               ->  Seq Scan on prt_p1  (cost=0.00..10003.75 rows=693475 width=8) (actual time=0.013..104.889 rows=693475 loops=1)
   ->  Hash Join  (cost=12708.91..65850.26 rows=4062026 width=16) (actual time=165.617..1698.680 rows=4219763 loops=1)
         Hash Cond: (prt2_p2.b = prt_p2.a)
         ->  Index Scan using p212_idx on prt2_p2  (cost=0.42..591.52 rows=21544 width=8) (actual time=0.071..51.162 rows=22137 loops=1)
               Index Cond: (a < 1000)
         ->  Hash  (cost=6808.77..6808.77 rows=471977 width=8) (actual time=164.729..164.729 rows=471977 loops=1)
               Buckets: 524288  Batches: 1  Memory Usage: 22533kB
               ->  Seq Scan on prt_p2  (cost=0.00..6808.77 rows=471977 width=8) (actual time=0.028..65.976 rows=471977 loops=1)
   ->  Hash Join  (cost=10444.66..40216.53 rows=2343590 width=16) (actual time=141.666..1000.168 rows=2340887 loops=1)
         Hash Cond: (prt2_p3.b = prt_p3.a)
         ->  Index Scan using p213_idx on prt2_p3  (cost=0.42..440.77 rows=15117 width=8) (actual time=0.061..34.892 rows=15011 loops=1)
               Index Cond: (a < 1000)
         ->  Hash  (cost=5595.77..5595.77 rows=387877 width=8) (actual time=140.439..140.439 rows=387877 loops=1)
               Buckets: 524288  Batches: 1  Memory Usage: 19248kB
               ->  Seq Scan on prt_p3  (cost=0.00..5595.77 rows=387877 width=8) (actual time=0.021..55.951 rows=387877 loops=1)
   ->  Hash Join  (cost=8953.65..28198.89 rows=1449554 width=16) (actual time=122.941..664.215 rows=1505612 loops=1)
         Hash Cond: (prt2_p4.b = prt_p4.a)
         ->  Index Scan using p214_idx on prt2_p4  (cost=0.42..341.98 rows=10918 width=8) (actual time=0.061..25.684 rows=11304 loops=1)
               Index Cond: (a < 1000)
         ->  Hash  (cost=4796.99..4796.99 rows=332499 width=8) (actual time=121.538..121.538 rows=332499 loops=1)
               Buckets: 524288  Batches: 1  Memory Usage: 17085kB
               ->  Seq Scan on prt_p4  (cost=0.00..4796.99 rows=332499 width=8) (actual time=0.029..48.231 rows=332499 loops=1)
   ->  Hash Join  (cost=7892.08..21696.00 rows=1052631 width=16) (actual time=106.121..491.855 rows=1064962 loops=1)
         Hash Cond: (prt2_p5.b = prt_p5.a)
         ->  Index Scan using p235_idx on prt2_p5  (cost=0.42..289.85 rows=8987 width=8) (actual time=0.058..20.238 rows=9062 loops=1)
               Index Cond: (a < 1000)
         ->  Hash  (cost=4227.96..4227.96 rows=293096 width=8) (actual time=104.960..104.960 rows=293096 loops=1)
               Buckets: 524288  Batches: 1  Memory Usage: 15546kB
               ->  Seq Scan on prt_p5  (cost=0.00..4227.96 rows=293096 width=8) (actual time=0.026..41.358 rows=293096 loops=1)
   ->  Merge Join  (cost=1373.10..30188.37 rows=1320708 width=16) (actual time=24.778..1087.875 rows=1333328 loops=1)
         Merge Cond: (prt_p6.a = prt2_p6.b)
         ->  Index Scan using p16_idx on prt_p6  (cost=0.42..7770.20 rows=494345 width=8) (actual time=0.050..503.330 rows=494345 loops=1)
         ->  Sort  (cost=1372.43..1405.84 rows=13363 width=8) (actual time=24.719..201.011 rows=1333228 loops=1)
               Sort Key: prt2_p6.b
               Sort Method: quicksort  Memory: 1117kB
               ->  Index Scan using p216_idx on prt2_p6  (cost=0.42..456.67 rows=13363 width=8) (actual time=0.052..19.558 rows=13387 loops=1)
                     Index Cond: (a < 1000)
   ->  Merge Join  (cost=500.33..10799.11 rows=430725 width=16) (actual time=12.028..370.614 rows=427376 loops=1)
         Merge Cond: (prt_p7.a = prt2_p7.b)
         ->  Index Scan using p22_idx on prt_p7  (cost=0.42..3311.69 rows=210655 width=8) (actual time=0.055..177.727 rows=210655 loops=1)
         ->  Sort  (cost=499.91..512.70 rows=5116 width=8) (actual time=11.470..65.991 rows=427306 loops=1)
               Sort Key: prt2_p7.b
               Sort Method: quicksort  Memory: 470kB
               ->  Index Scan using p237_idx on prt2_p7  (cost=0.42..184.74 rows=5116 width=8) (actual time=0.060..9.460 rows=5068 loops=1)
                     Index Cond: (a < 1000)
   ->  Merge Join  (cost=796.46..15849.79 rows=561048 width=16) (actual time=15.045..623.898 rows=598267 loops=1)
         Merge Cond: (prt_p8.a = prt2_p8.b)
         ->  Index Scan using p23_idx on prt_p8  (cost=0.42..5727.78 rows=364390 width=8) (actual time=0.034..333.172 rows=364390 loops=1)
         ->  Sort  (cost=795.85..815.11 rows=7704 width=8) (actual time=15.004..94.252 rows=598197 loops=1)
               Sort Key: prt2_p8.b
               Sort Method: quicksort  Memory: 638kB
               ->  Index Scan using p238_idx on prt2_p8  (cost=0.42..298.51 rows=7704 width=8) (actual time=0.037..11.973 rows=8153 loops=1)
                     Index Cond: (a < 1000)
   ->  Merge Join  (cost=311.21..6140.54 rows=198479 width=16) (actual time=6.364..224.136 rows=200887 loops=1)
         Merge Cond: (prt_p9.a = prt2_p9.b)
         ->  Index Scan using p24_idx on prt_p9  (cost=0.42..2461.19 rows=156549 width=8) (actual time=0.043..121.970 rows=156443 loops=1)
         ->  Sort  (cost=310.79..318.72 rows=3172 width=8) (actual time=6.313..32.340 rows=200830 loops=1)
               Sort Key: prt2_p9.b
               Sort Method: quicksort  Memory: 271kB
               ->  Index Scan using p239_idx on prt2_p9  (cost=0.42..126.32 rows=3172 width=8) (actual time=0.037..5.173 rows=3198 loops=1)
                     Index Cond: (a < 1000)
   ->  Merge Join  (cost=285.33..5372.90 rows=166638 width=16) (actual time=6.384..197.223 rows=157849 loops=1)
         Merge Cond: (prt_p10.a = prt2_p10.b)
         ->  Index Scan using p25_idx on prt_p10  (cost=0.42..2233.31 rows=142046 width=8) (actual time=0.033..112.935 rows=142046 loops=1)
         ->  Sort  (cost=284.91..292.25 rows=2936 width=8) (actual time=5.705..26.248 rows=157804 loops=1)
               Sort Key: prt2_p10.b
               Sort Method: quicksort  Memory: 248kB
               ->  Index Scan using p230_idx on prt2_p10  (cost=0.42..115.80 rows=2936 width=8) (actual time=0.035..4.641 rows=2778 loops=1)
                     Index Cond: (a < 1000)
   ->  Hash Join  (cost=3471.36..7285.57 rows=126706 width=16) (actual time=48.284..106.923 rows=124391 loops=1)
         Hash Cond: (prt2_p11.b = prt_p11.a)
         ->  Seq Scan on prt2_p11  (cost=0.00..2172.00 rows=2460 width=8) (actual time=0.023..19.509 rows=2401 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 125919
         ->  Hash  (cost=1860.05..1860.05 rows=128905 width=8) (actual time=47.860..47.860 rows=128905 loops=1)
               Buckets: 131072  Batches: 1  Memory Usage: 6060kB
               ->  Seq Scan on prt_p11  (cost=0.00..1860.05 rows=128905 width=8) (actual time=0.013..19.517 rows=128905 loops=1)
   ->  Hash Join  (cost=3145.81..6353.73 rows=96239 width=16) (actual time=41.526..91.583 rows=96451 loops=1)
         Hash Cond: (prt2_p12.b = prt_p12.a)
         ->  Seq Scan on prt2_p12  (cost=0.00..1980.18 rows=2061 width=8) (actual time=0.023..18.574 rows=2053 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 114921
         ->  Hash  (cost=1685.36..1685.36 rows=116836 width=8) (actual time=41.057..41.057 rows=116836 loops=1)
               Buckets: 131072  Batches: 1  Memory Usage: 5588kB
               ->  Seq Scan on prt_p12  (cost=0.00..1685.36 rows=116836 width=8) (actual time=0.012..17.093 rows=116836 loops=1)
   ->  Hash Join  (cost=2832.84..5629.34 rows=79542 width=16) (actual time=37.827..77.271 rows=79365 loops=1)
         Hash Cond: (prt2_p13.b = prt_p13.a)
         ->  Seq Scan on prt2_p13  (cost=0.00..1788.34 rows=1891 width=8) (actual time=0.025..15.555 rows=1898 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 103729
         ->  Hash  (cost=1517.93..1517.93 rows=105193 width=8) (actual time=37.276..37.276 rows=105193 loops=1)
               Buckets: 131072  Batches: 1  Memory Usage: 5134kB
               ->  Seq Scan on prt_p13  (cost=0.00..1517.93 rows=105193 width=8) (actual time=0.020..15.346 rows=105193 loops=1)
   ->  Hash Join  (cost=2548.62..4943.63 rows=62346 width=16) (actual time=32.939..67.306 rows=61810 loops=1)
         Hash Cond: (prt2_p14.b = prt_p14.a)
         ->  Seq Scan on prt2_p14  (cost=0.00..1604.59 rows=1649 width=8) (actual time=0.015..14.530 rows=1628 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 93139
         ->  Hash  (cost=1365.50..1365.50 rows=94650 width=8) (actual time=32.485..32.485 rows=94650 loops=1)
               Buckets: 131072  Batches: 1  Memory Usage: 4722kB
               ->  Seq Scan on prt_p14  (cost=0.00..1365.50 rows=94650 width=8) (actual time=0.012..13.453 rows=94650 loops=1)
   ->  Hash Join  (cost=2274.71..4305.84 rows=46561 width=16) (actual time=33.014..62.296 rows=46940 loops=1)
         Hash Cond: (prt2_p21.b = prt_p21.a)
         ->  Seq Scan on prt2_p21  (cost=0.00..1436.24 rows=1379 width=8) (actual time=0.026..13.259 rows=1385 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 83434
         ->  Hash  (cost=1218.76..1218.76 rows=84476 width=8) (actual time=32.611..32.611 rows=84476 loops=1)
               Buckets: 131072  Batches: 1  Memory Usage: 4324kB
               ->  Seq Scan on prt_p21  (cost=0.00..1218.76 rows=84476 width=8) (actual time=0.013..13.220 rows=84476 loops=1)
   ->  Hash Join  (cost=2022.37..3753.46 rows=35778 width=16) (actual time=27.294..49.272 rows=36070 loops=1)
         Hash Cond: (prt2_p15.b = prt_p15.a)
         ->  Seq Scan on prt2_p15  (cost=0.00..1276.46 rows=1192 width=8) (actual time=0.025..11.005 rows=1199 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 74198
         ->  Hash  (cost=1083.83..1083.83 rows=75083 width=8) (actual time=26.785..26.785 rows=75083 loops=1)
               Buckets: 131072  Batches: 1  Memory Usage: 3957kB
               ->  Seq Scan on prt_p15  (cost=0.00..1083.83 rows=75083 width=8) (actual time=0.023..10.919 rows=75083 loops=1)
   ->  Hash Join  (cost=1787.37..3272.64 rows=28496 width=16) (actual time=23.200..41.630 rows=27777 loops=1)
         Hash Cond: (prt2_p22.b = prt_p22.a)
         ->  Seq Scan on prt2_p22  (cost=0.00..1119.69 rows=1075 width=8) (actual time=0.022..10.126 rows=1048 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 65087
         ->  Hash  (cost=957.72..957.72 rows=66372 width=8) (actual time=22.770..22.770 rows=66372 loops=1)
               Buckets: 131072  Batches: 1  Memory Usage: 3617kB
               ->  Seq Scan on prt_p22  (cost=0.00..957.72 rows=66372 width=8) (actual time=0.014..9.409 rows=66372 loops=1)
   ->  Hash Join  (cost=1559.01..2819.24 rows=22275 width=16) (actual time=21.646..37.571 rows=20885 loops=1)
         Hash Cond: (prt2_p16.b = prt_p16.a)
         ->  Seq Scan on prt2_p16  (cost=0.00..974.89 rows=963 width=8) (actual time=0.026..9.738 rows=909 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 56682
         ->  Hash  (cost=835.67..835.67 rows=57867 width=8) (actual time=21.385..21.385 rows=57867 loops=1)
               Buckets: 65536  Batches: 1  Memory Usage: 2773kB
               ->  Seq Scan on prt_p16  (cost=0.00..835.67 rows=57867 width=8) (actual time=0.014..8.688 rows=57867 loops=1)
   ->  Hash Join  (cost=1348.64..2383.45 rows=15061 width=16) (actual time=20.115..32.412 rows=14843 loops=1)
         Hash Cond: (prt2_p23.b = prt_p23.a)
         ->  Seq Scan on prt2_p23  (cost=0.00..839.96 rows=753 width=8) (actual time=0.024..7.720 rows=736 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 48861
         ->  Hash  (cost=722.73..722.73 rows=50073 width=8) (actual time=19.801..19.801 rows=50073 loops=1)
               Buckets: 65536  Batches: 1  Memory Usage: 2468kB
               ->  Seq Scan on prt_p23  (cost=0.00..722.73 rows=50073 width=8) (actual time=0.021..8.233 rows=50073 loops=1)
   ->  Hash Join  (cost=1146.22..2015.80 rows=10863 width=16) (actual time=15.867..25.521 rows=10376 loops=1)
         Hash Cond: (prt2_p17.b = prt_p17.a)
         ->  Seq Scan on prt2_p17  (cost=0.00..724.21 rows=639 width=8) (actual time=0.025..6.512 rows=620 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 42117
         ->  Hash  (cost=614.43..614.43 rows=42543 width=8) (actual time=15.473..15.473 rows=42543 loops=1)
               Buckets: 65536  Batches: 1  Memory Usage: 2174kB
               ->  Seq Scan on prt_p17  (cost=0.00..614.43 rows=42543 width=8) (actual time=0.024..6.583 rows=42543 loops=1)
   ->  Hash Join  (cost=953.12..1645.72 rows=7101 width=16) (actual time=12.577..19.679 rows=7171 loops=1)
         Hash Cond: (prt2_p18.b = prt_p18.a)
         ->  Seq Scan on prt2_p18  (cost=0.00..599.00 rows=502 width=8) (actual time=0.015..5.164 rows=506 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 34854
         ->  Hash  (cost=510.83..510.83 rows=35383 width=8) (actual time=12.332..12.332 rows=35383 loops=1)
               Buckets: 65536  Batches: 1  Memory Usage: 1895kB
               ->  Seq Scan on prt_p18  (cost=0.00..510.83 rows=35383 width=8) (actual time=0.015..5.213 rows=35383 loops=1)
   ->  Hash Join  (cost=761.87..1298.35 rows=4731 width=16) (actual time=9.686..15.285 rows=4635 loops=1)
         Hash Cond: (prt2_p24.b = prt_p24.a)
         ->  Seq Scan on prt2_p24  (cost=0.00..475.55 rows=419 width=8) (actual time=0.015..4.230 rows=408 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 27636
         ->  Hash  (cost=408.61..408.61 rows=28261 width=8) (actual time=9.573..9.573 rows=28261 loops=1)
               Buckets: 32768  Batches: 1  Memory Usage: 1360kB
               ->  Seq Scan on prt_p24  (cost=0.00..408.61 rows=28261 width=8) (actual time=0.011..4.005 rows=28261 loops=1)
   ->  Hash Join  (cost=570.14..968.10 rows=2447 width=16) (actual time=7.524..11.365 rows=2467 loops=1)
         Hash Cond: (prt2_p19.b = prt_p19.a)
         ->  Seq Scan on prt2_p19  (cost=0.00..364.81 rows=289 width=8) (actual time=0.021..3.150 rows=283 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 21222
         ->  Hash  (cost=305.62..305.62 rows=21162 width=8) (actual time=7.404..7.404 rows=21162 loops=1)
               Buckets: 32768  Batches: 1  Memory Usage: 1083kB
               ->  Seq Scan on prt_p19  (cost=0.00..305.62 rows=21162 width=8) (actual time=0.012..3.059 rows=21162 loops=1)
   ->  Hash Join  (cost=636.40..1067.05 rows=1626 width=16) (actual time=8.251..12.308 rows=1782 loops=1)
         Hash Cond: (prt2_p25.b = prt_p25.a)
         ->  Seq Scan on prt2_p25  (cost=0.00..406.80 rows=337 width=8) (actual time=0.017..3.536 rows=338 loops=1)
               Filter: (a < 1000)
               Rows Removed by Filter: 23646
         ->  Hash  (cost=341.18..341.18 rows=23618 width=8) (actual time=8.139..8.139 rows=23618 loops=1)
               Buckets: 32768  Batches: 1  Memory Usage: 1179kB
               ->  Seq Scan on prt_p25  (cost=0.00..341.18 rows=23618 width=8) (actual time=0.012..3.396 rows=23618 loops=1)
   ->  Hash Join  (cost=49.70..125.01 rows=82 width=16) (actual time=0.474..1.086 rows=69 loops=1)
         Hash Cond: (prt_p20.a = prt2_p20.b)
         ->  Seq Scan on prt_p20  (cost=0.00..40.33 rows=2733 width=8) (actual time=0.010..0.279 rows=2733 loops=1)
         ->  Hash  (cost=49.12..49.12 rows=46 width=8) (actual time=0.448..0.448 rows=46 loops=1)
               Buckets: 1024  Batches: 1  Memory Usage: 10kB
               ->  Seq Scan on prt2_p20  (cost=0.00..49.12 rows=46 width=8) (actual time=0.020..0.433 rows=46 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 2844
 Planning time: 7.999 ms
 Execution time: 15577.507 ms
(198 rows)
 without patch:
 explain analyse  select * from prt, prt2 where prt.a = prt2.b and prt2.a < 1000;
                                                                   QUERY PLAN                                                                   
------------------------------------------------------------------------------------------------------------------------------------------------
 Hash Join  (cost=21724.76..492156.09 rows=16499019 width=16) (actual time=421.363..8235.051 rows=26941347 loops=1)
   Hash Cond: (prt.a = prt2.b)
   ->  Append  (cost=0.00..64637.64 rows=4480065 width=8) (actual time=0.019..832.657 rows=4480064 loops=1)
         ->  Seq Scan on prt  (cost=0.00..0.00 rows=1 width=8) (actual time=0.006..0.006 rows=0 loops=1)
         ->  Seq Scan on prt_p1  (cost=0.00..10003.75 rows=693475 width=8) (actual time=0.012..89.054 rows=693475 loops=1)
         ->  Seq Scan on prt_p2  (cost=0.00..6808.77 rows=471977 width=8) (actual time=0.015..57.411 rows=471977 loops=1)
         ->  Seq Scan on prt_p3  (cost=0.00..5595.77 rows=387877 width=8) (actual time=0.013..45.144 rows=387877 loops=1)
         ->  Seq Scan on prt_p4  (cost=0.00..4796.99 rows=332499 width=8) (actual time=0.014..37.147 rows=332499 loops=1)
         ->  Seq Scan on prt_p5  (cost=0.00..4227.96 rows=293096 width=8) (actual time=0.013..34.134 rows=293096 loops=1)
         ->  Seq Scan on prt_p6  (cost=0.00..7131.45 rows=494345 width=8) (actual time=0.013..56.856 rows=494345 loops=1)
         ->  Seq Scan on prt_p7  (cost=0.00..3039.55 rows=210655 width=8) (actual time=0.016..23.926 rows=210655 loops=1)
         ->  Seq Scan on prt_p8  (cost=0.00..5256.90 rows=364390 width=8) (actual time=0.019..40.668 rows=364390 loops=1)
         ->  Seq Scan on prt_p9  (cost=0.00..2258.49 rows=156549 width=8) (actual time=0.013..17.001 rows=156549 loops=1)
         ->  Seq Scan on prt_p10  (cost=0.00..2049.46 rows=142046 width=8) (actual time=0.013..15.339 rows=142046 loops=1)
         ->  Seq Scan on prt_p11  (cost=0.00..1860.05 rows=128905 width=8) (actual time=0.013..13.967 rows=128905 loops=1)
         ->  Seq Scan on prt_p12  (cost=0.00..1685.36 rows=116836 width=8) (actual time=0.011..12.364 rows=116836 loops=1)
         ->  Seq Scan on prt_p13  (cost=0.00..1517.93 rows=105193 width=8) (actual time=0.011..11.996 rows=105193 loops=1)
         ->  Seq Scan on prt_p14  (cost=0.00..1365.50 rows=94650 width=8) (actual time=0.012..9.990 rows=94650 loops=1)
         ->  Seq Scan on prt_p21  (cost=0.00..1218.76 rows=84476 width=8) (actual time=0.011..8.608 rows=84476 loops=1)
         ->  Seq Scan on prt_p15  (cost=0.00..1083.83 rows=75083 width=8) (actual time=0.010..7.669 rows=75083 loops=1)
         ->  Seq Scan on prt_p22  (cost=0.00..957.72 rows=66372 width=8) (actual time=0.011..7.371 rows=66372 loops=1)
         ->  Seq Scan on prt_p16  (cost=0.00..835.67 rows=57867 width=8) (actual time=0.012..6.698 rows=57867 loops=1)
         ->  Seq Scan on prt_p23  (cost=0.00..722.73 rows=50073 width=8) (actual time=0.013..5.438 rows=50073 loops=1)
         ->  Seq Scan on prt_p17  (cost=0.00..614.43 rows=42543 width=8) (actual time=0.013..4.372 rows=42543 loops=1)
         ->  Seq Scan on prt_p18  (cost=0.00..510.83 rows=35383 width=8) (actual time=0.009..3.616 rows=35383 loops=1)
         ->  Seq Scan on prt_p24  (cost=0.00..408.61 rows=28261 width=8) (actual time=0.009..3.050 rows=28261 loops=1)
         ->  Seq Scan on prt_p19  (cost=0.00..305.62 rows=21162 width=8) (actual time=0.012..2.146 rows=21162 loops=1)
         ->  Seq Scan on prt_p25  (cost=0.00..341.18 rows=23618 width=8) (actual time=0.008..2.391 rows=23618 loops=1)
         ->  Seq Scan on prt_p20  (cost=0.00..40.33 rows=2733 width=8) (actual time=0.010..0.303 rows=2733 loops=1)
   ->  Hash  (cost=19818.46..19818.46 rows=152504 width=8) (actual time=421.087..421.087 rows=153275 loops=1)
         Buckets: 262144  Batches: 1  Memory Usage: 8036kB
         ->  Append  (cost=0.00..19818.46 rows=152504 width=8) (actual time=0.075..372.473 rows=153275 loops=1)
               ->  Seq Scan on prt2  (cost=0.00..0.00 rows=1 width=8) (actual time=0.007..0.007 rows=0 loops=1)
                     Filter: (a < 1000)
               ->  Index Scan using p211_idx on prt2_p1  (cost=0.42..1160.46 rows=47991 width=8) (actual time=0.067..72.745 rows=47719 loops=1)
                     Index Cond: (a < 1000)
               ->  Index Scan using p212_idx on prt2_p2  (cost=0.42..591.52 rows=21544 width=8) (actual time=0.060..36.392 rows=22137 loops=1)
                     Index Cond: (a < 1000)
               ->  Index Scan using p213_idx on prt2_p3  (cost=0.42..440.77 rows=15117 width=8) (actual time=0.045..20.666 rows=15011 loops=1)
                     Index Cond: (a < 1000)
               ->  Index Scan using p214_idx on prt2_p4  (cost=0.42..341.98 rows=10918 width=8) (actual time=0.081..16.049 rows=11304 loops=1)
                     Index Cond: (a < 1000)
               ->  Index Scan using p235_idx on prt2_p5  (cost=0.42..289.85 rows=8987 width=8) (actual time=0.037..13.822 rows=9062 loops=1)
                     Index Cond: (a < 1000)
               ->  Index Scan using p216_idx on prt2_p6  (cost=0.42..456.67 rows=13363 width=8) (actual time=0.036..23.542 rows=13387 loops=1)
                     Index Cond: (a < 1000)
               ->  Index Scan using p237_idx on prt2_p7  (cost=0.42..184.74 rows=5116 width=8) (actual time=0.037..6.885 rows=5068 loops=1)
                     Index Cond: (a < 1000)
               ->  Index Scan using p238_idx on prt2_p8  (cost=0.42..298.51 rows=7704 width=8) (actual time=0.043..15.022 rows=8153 loops=1)
                     Index Cond: (a < 1000)
               ->  Index Scan using p239_idx on prt2_p9  (cost=0.42..126.32 rows=3172 width=8) (actual time=0.038..4.762 rows=3198 loops=1)
                     Index Cond: (a < 1000)
               ->  Index Scan using p230_idx on prt2_p10  (cost=0.42..115.80 rows=2936 width=8) (actual time=0.037..3.555 rows=2778 loops=1)
                     Index Cond: (a < 1000)
               ->  Seq Scan on prt2_p11  (cost=0.00..2172.00 rows=2460 width=8) (actual time=0.022..19.124 rows=2401 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 125919
               ->  Seq Scan on prt2_p12  (cost=0.00..1980.18 rows=2061 width=8) (actual time=0.013..18.017 rows=2053 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 114921
               ->  Seq Scan on prt2_p13  (cost=0.00..1788.34 rows=1891 width=8) (actual time=0.015..15.793 rows=1898 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 103729
               ->  Seq Scan on prt2_p14  (cost=0.00..1604.59 rows=1649 width=8) (actual time=0.012..13.868 rows=1628 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 93139
               ->  Seq Scan on prt2_p21  (cost=0.00..1436.24 rows=1379 width=8) (actual time=0.021..12.966 rows=1385 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 83434
               ->  Seq Scan on prt2_p15  (cost=0.00..1276.46 rows=1192 width=8) (actual time=0.022..11.849 rows=1199 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 74198
               ->  Seq Scan on prt2_p16  (cost=0.00..974.89 rows=963 width=8) (actual time=0.023..8.597 rows=909 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 56682
               ->  Seq Scan on prt2_p17  (cost=0.00..724.21 rows=639 width=8) (actual time=0.011..8.226 rows=620 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 42117
               ->  Seq Scan on prt2_p18  (cost=0.00..599.00 rows=502 width=8) (actual time=0.013..5.927 rows=506 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 34854
               ->  Seq Scan on prt2_p19  (cost=0.00..364.81 rows=289 width=8) (actual time=0.025..3.210 rows=283 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 21222
               ->  Seq Scan on prt2_p20  (cost=0.00..49.12 rows=46 width=8) (actual time=0.019..0.415 rows=46 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 2844
               ->  Seq Scan on prt2_p22  (cost=0.00..1119.69 rows=1075 width=8) (actual time=0.019..9.873 rows=1048 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 65087
               ->  Seq Scan on prt2_p23  (cost=0.00..839.96 rows=753 width=8) (actual time=0.014..7.468 rows=736 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 48861
               ->  Seq Scan on prt2_p24  (cost=0.00..475.55 rows=419 width=8) (actual time=0.013..4.134 rows=408 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 27636
               ->  Seq Scan on prt2_p25  (cost=0.00..406.80 rows=337 width=8) (actual time=0.016..3.436 rows=338 loops=1)
                     Filter: (a < 1000)
                     Rows Removed by Filter: 23646
 Planning time: 2.305 ms
 Execution time: 9202.962 ms
(101 rows)