|
QUERY PLAN |
1 |
Aggregate (cost=871292.26..871292.27 rows=1 width=0) (actual time=3646.796..3646.797 rows=1 loops=1) |
2 |
-> Nested Loop (cost=0.28..870956.24 rows=134408 width=0) (actual time=35.374..3646.762 rows=26 loops=1) |
3 |
-> Seq Scan on arr a1 (cost=0.00..22.70 rows=1270 width=36) (actual time=0.009..0.761 rows=600 loops=1) |
4 |
-> Index Scan using arr_pkey on arr a2 (cost=0.28..684.71 rows=106 width=36) (actual time=5.908..6.074 rows=0 loops=600) |
5 |
Index Cond: (a1.id < id) |
6 |
Filter: ((NOT (SubPlan 1)) AND (NOT (SubPlan 2))) |
7 |
Rows Removed by Filter: 299 |
8 |
SubPlan 1 |
9 |
-> HashSetOp Except (cost=0.76..5.03 rows=100 width=0) (actual time=0.018..0.018 rows=1 loops=179700) |
10 |
-> Append (cost=0.76..4.53 rows=200 width=0) (actual time=0.006..0.015 rows=9 loops=179700) |
11 |
-> Subquery Scan on "*SELECT* 1" (cost=0.76..2.26 rows=100 width=0) (actual time=0.006..0.007 rows=4 loops=179700) |
12 |
-> HashAggregate (cost=0.76..1.26 rows=100 width=0) (actual time=0.004..0.005 rows=4 loops=179700) |
13 |
Group Key: unnest(a1.arr) |
14 |
-> Result (cost=0.00..0.51 rows=100 width=0) (actual time=0.001..0.002 rows=5 loops=179700) |
15 |
-> Subquery Scan on "*SELECT* 2" (cost=0.76..2.26 rows=100 width=0) (actual time=0.006..0.007 rows=4 loops=179700) |
16 |
-> HashAggregate (cost=0.76..1.26 rows=100 width=0) (actual time=0.004..0.005 rows=4 loops=179700) |
17 |
Group Key: unnest(a2.arr) |
18 |
-> Result (cost=0.00..0.51 rows=100 width=0) (actual time=0.001..0.002 rows=5 loops=179700) |
19 |
SubPlan 2 |
20 |
-> HashSetOp Except (cost=0.76..5.03 rows=100 width=0) (actual time=0.023..0.023 rows=1 loops=377) |
21 |
-> Append (cost=0.76..4.53 rows=200 width=0) (actual time=0.009..0.020 rows=8 loops=377) |
22 |
-> Subquery Scan on "*SELECT* 1_1" (cost=0.76..2.26 rows=100 width=0) (actual time=0.008..0.009 rows=5 loops=377) |
23 |
-> HashAggregate (cost=0.76..1.26 rows=100 width=0) (actual time=0.005..0.006 rows=5 loops=377) |
24 |
Group Key: unnest(a2.arr) |
25 |
-> Result (cost=0.00..0.51 rows=100 width=0) (actual time=0.002..0.003 rows=5 loops=377) |
26 |
-> Subquery Scan on "*SELECT* 2_1" (cost=0.76..2.26 rows=100 width=0) (actual time=0.008..0.009 rows=3 loops=377) |
27 |
-> HashAggregate (cost=0.76..1.26 rows=100 width=0) (actual time=0.005..0.006 rows=3 loops=377) |
28 |
Group Key: unnest(a1.arr) |
29 |
-> Result (cost=0.00..0.51 rows=100 width=0) (actual time=0.002..0.002 rows=5 loops=377) |
30 |
Planning time: 0.413 ms |
31 |
Execution time: 3647.091 ms |