Aggregate (cost=18119.62..18119.63 rows=1 width=8) (actual time=510.040..510.040 rows=1 loops=1) Output: count(*) -> Nested Loop (cost=68.00..18119.00 rows=250 width=0) (actual time=1.700..509.848 rows=2000 loops=1) Join Filter: ((sc_19_01_d.id = sg_19_01_d.sc_fk) AND (sc_19_01_d.a = sg_19_01_d.a) AND (sc_19_01_d.o = sg_19_01_d.o) AND (sc_19_01_d.sl = sg_19_01_d.sl)) Rows Removed by Join Filter: 3998000 -> HashAggregate (cost=68.00..72.00 rows=400 width=15) (actual time=1.153..2.700 rows=2000 loops=1) Output: sg_19_01_d.sc_fk, sg_19_01_d.a, sg_19_01_d.o, sg_19_01_d.sl Group Key: sg_19_01_d.sc_fk, sg_19_01_d.a, sg_19_01_d.o, sg_19_01_d.sl -> Append (cost=0.00..48.00 rows=2000 width=15) (actual time=0.013..0.508 rows=2000 loops=1) -> Seq Scan on sg_19_01_d (cost=0.00..19.00 rows=1000 width=15) (actual time=0.013..0.190 rows=1000 loops=1) Output: sg_19_01_d.sc_fk, sg_19_01_d.a, sg_19_01_d.o, sg_19_01_d.sl -> Seq Scan on sg_19_02_d (cost=0.00..19.00 rows=1000 width=15) (actual time=0.008..0.174 rows=1000 loops=1) Output: sg_19_02_d.sc_fk, sg_19_02_d.a, sg_19_02_d.o, sg_19_02_d.sl -> Materialize (cost=0.00..52.00 rows=2000 width=15) (actual time=0.000..0.101 rows=2000 loops=2000) Output: sc_19_01_d.id, sc_19_01_d.a, sc_19_01_d.o, sc_19_01_d.sl -> Append (cost=0.00..42.00 rows=2000 width=15) (actual time=0.009..0.477 rows=2000 loops=1) -> Seq Scan on sc_19_01_d (cost=0.00..16.00 rows=1000 width=15) (actual time=0.008..0.165 rows=1000 loops=1) Output: sc_19_01_d.id, sc_19_01_d.a, sc_19_01_d.o, sc_19_01_d.sl -> Seq Scan on sc_19_02_d (cost=0.00..16.00 rows=1000 width=15) (actual time=0.008..0.167 rows=1000 loops=1) Output: sc_19_02_d.id, sc_19_02_d.a, sc_19_02_d.o, sc_19_02_d.sl Planning Time: 0.208 ms Execution Time: 510.135 ms Finalize Aggregate (cost=23540.42..23540.43 rows=1 width=8) (actual time=145.961..145.961 rows=1 loops=1) Output: count(*) -> Gather (cost=23540.00..23540.42 rows=4 width=8) (actual time=138.125..147.773 rows=2 loops=1) Output: (PARTIAL count(*)) Workers Planned: 2 Workers Launched: 2 -> Parallel Append (cost=22540.00..22540.01 rows=2 width=8) (actual time=86.435..86.435 rows=1 loops=3) Worker 0: actual time=124.523..124.524 rows=1 loops=1 Worker 1: actual time=0.001..0.001 rows=0 loops=1 -> Partial Aggregate (cost=22540.00..22540.01 rows=1 width=8) (actual time=124.522..124.522 rows=1 loops=1) Output: PARTIAL count(*) Worker 0: actual time=124.522..124.522 rows=1 loops=1 -> Nested Loop Semi Join (cost=0.00..22537.50 rows=1000 width=0) (actual time=0.045..124.445 rows=1000 loops=1) Join Filter: ((sc_19_01_d.id = sg_19_01_d.sc_fk) AND (sc_19_01_d.a = sg_19_01_d.a) AND (sc_19_01_d.o = sg_19_01_d.o) AND (sc_19_01_d.sl = sg_19_01_d.sl)) Rows Removed by Join Filter: 499500 Worker 0: actual time=0.045..124.445 rows=1000 loops=1 -> Seq Scan on sc_19_01_d (cost=0.00..16.00 rows=1000 width=15) (actual time=0.025..0.226 rows=1000 loops=1) Output: sc_19_01_d.id, sc_19_01_d.a, sc_19_01_d.o, sc_19_01_d.sl Worker 0: actual time=0.025..0.226 rows=1000 loops=1 -> Materialize (cost=0.00..24.00 rows=1000 width=15) (actual time=0.000..0.057 rows=500 loops=1000) Output: sg_19_01_d.sc_fk, sg_19_01_d.a, sg_19_01_d.o, sg_19_01_d.sl Worker 0: actual time=0.000..0.057 rows=500 loops=1000 -> Seq Scan on sg_19_01_d (cost=0.00..19.00 rows=1000 width=15) (actual time=0.012..0.240 rows=1000 loops=1) Output: sg_19_01_d.sc_fk, sg_19_01_d.a, sg_19_01_d.o, sg_19_01_d.sl Worker 0: actual time=0.012..0.240 rows=1000 loops=1 -> Partial Aggregate (cost=22540.00..22540.01 rows=1 width=8) (actual time=134.779..134.779 rows=1 loops=1) Output: PARTIAL count(*) -> Nested Loop Semi Join (cost=0.00..22537.50 rows=1000 width=0) (actual time=0.038..134.685 rows=1000 loops=1) Join Filter: ((sc_19_02_d.id = sg_19_02_d.sc_fk) AND (sc_19_02_d.a = sg_19_02_d.a) AND (sc_19_02_d.o = sg_19_02_d.o) AND (sc_19_02_d.sl = sg_19_02_d.sl)) Rows Removed by Join Filter: 499500 -> Seq Scan on sc_19_02_d (cost=0.00..16.00 rows=1000 width=15) (actual time=0.020..0.221 rows=1000 loops=1) Output: sc_19_02_d.id, sc_19_02_d.a, sc_19_02_d.o, sc_19_02_d.sl -> Materialize (cost=0.00..24.00 rows=1000 width=15) (actual time=0.000..0.047 rows=500 loops=1000) Output: sg_19_02_d.sc_fk, sg_19_02_d.a, sg_19_02_d.o, sg_19_02_d.sl -> Seq Scan on sg_19_02_d (cost=0.00..19.00 rows=1000 width=15) (actual time=0.011..0.266 rows=1000 loops=1) Output: sg_19_02_d.sc_fk, sg_19_02_d.a, sg_19_02_d.o, sg_19_02_d.sl Planning Time: 0.229 ms Execution Time: 147.833 ms Aggregate (cost=16130.25..16130.26 rows=1 width=8) (actual time=494.500..494.500 rows=1 loops=1) Output: count(*) -> Nested Loop (cost=73.00..16129.00 rows=500 width=0) (actual time=4.304..494.332 rows=2000 loops=1) Join Filter: ((sc_19_01_d.id = sg_19_01_d.sc_fk) AND (sc_19_01_d.a = sg_19_01_d.a) AND (sc_19_01_d.o = sg_19_01_d.o)) Rows Removed by Join Filter: 3998000 -> HashAggregate (cost=73.00..77.00 rows=400 width=15) (actual time=3.503..5.187 rows=2000 loops=1) Output: sg_19_01_d.sc_fk, sg_19_01_d.a, sg_19_01_d.o, sg_19_01_d.sl Group Key: sg_19_01_d.sc_fk, sg_19_01_d.a, sg_19_01_d.o, sg_19_01_d.sl -> Append (cost=0.00..53.00 rows=2000 width=15) (actual time=0.032..1.475 rows=2000 loops=1) -> Seq Scan on sg_19_01_d (cost=0.00..21.50 rows=1000 width=15) (actual time=0.030..0.562 rows=1000 loops=1) Output: sg_19_01_d.sc_fk, sg_19_01_d.a, sg_19_01_d.o, sg_19_01_d.sl Filter: (sg_19_01_d.sl = 5) -> Seq Scan on sg_19_02_d (cost=0.00..21.50 rows=1000 width=15) (actual time=0.031..0.553 rows=1000 loops=1) Output: sg_19_02_d.sc_fk, sg_19_02_d.a, sg_19_02_d.o, sg_19_02_d.sl Filter: (sg_19_02_d.sl = 5) -> Materialize (cost=0.00..57.00 rows=2000 width=15) (actual time=0.000..0.099 rows=2000 loops=2000) Output: sc_19_01_d.id, sc_19_01_d.a, sc_19_01_d.o, sc_19_01_d.sl -> Append (cost=0.00..47.00 rows=2000 width=15) (actual time=0.030..0.719 rows=2000 loops=1) -> Seq Scan on sc_19_01_d (cost=0.00..18.50 rows=1000 width=15) (actual time=0.029..0.272 rows=1000 loops=1) Output: sc_19_01_d.id, sc_19_01_d.a, sc_19_01_d.o, sc_19_01_d.sl Filter: (sc_19_01_d.sl = 5) -> Seq Scan on sc_19_02_d (cost=0.00..18.50 rows=1000 width=15) (actual time=0.014..0.231 rows=1000 loops=1) Output: sc_19_02_d.id, sc_19_02_d.a, sc_19_02_d.o, sc_19_02_d.sl Filter: (sc_19_02_d.sl = 5) Planning Time: 1.290 ms Execution Time: 494.793 ms