explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jbyE

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=17,276,033.74..17,578,359.28 rows=2,140,358 width=624) (actual rows= loops=)

  • Group Key: t2.type, t2.provider, t2.day, t2.code_geo, t2.code_zone
2.          

CTE t0

3. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.00..7,913,888.83 rows=925,280 width=151) (actual rows= loops=)

  • Workers Planned: 2
4. 0.000 0.000 ↓ 0.0

Result (cost=0.00..7,820,360.83 rows=385,533,000 width=151) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..2,037,365.83 rows=385,533,000 width=119) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on malmo_sequences f (cost=0.00..106,809.33 rows=385,533 width=164) (actual rows= loops=)

7.          

CTE t1

8. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.00..395,995.33 rows=925,280 width=12) (actual rows= loops=)

  • Workers Planned: 2
9. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..302,467.33 rows=38,553,300 width=12) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on malmo_sequences (cost=0.00..106,809.33 rows=385,533 width=33) (actual rows= loops=)

11.          

CTE t2

12. 0.000 0.000 ↓ 0.0

Merge Join (cost=220,397.35..601,899.55 rows=21,403,577 width=1,132) (actual rows= loops=)

  • Merge Cond: ((t0.id_start = t1.id_start) AND (t0.id_end = t1.id_end))
13. 0.000 0.000 ↓ 0.0

Sort (cost=110,198.68..112,511.88 rows=925,280 width=1,136) (actual rows= loops=)

  • Sort Key: t0.id_start, t0.id_end
14. 0.000 0.000 ↓ 0.0

CTE Scan on t0 (cost=0.00..18,505.60 rows=925,280 width=1,136) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Sort (cost=110,198.68..112,511.88 rows=925,280 width=12) (actual rows= loops=)

  • Sort Key: t1.id_start, t1.id_end
16. 0.000 0.000 ↓ 0.0

CTE Scan on t1 (cost=0.00..18,505.60 rows=925,280 width=12) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Sort (cost=8,364,250.03..8,404,381.74 rows=16,052,683 width=1,132) (actual rows= loops=)

  • Sort Key: t2.type, t2.provider, t2.day, t2.code_geo, t2.code_zone
18. 0.000 0.000 ↓ 0.0

Hash Anti Join (cost=30.25..1,783,215.71 rows=16,052,683 width=1,132) (actual rows= loops=)

  • Hash Cond: (((t2.type)::text = b.type) AND (t2.provider = b.provider))
19. 0.000 0.000 ↓ 0.0

CTE Scan on t2 (cost=0.00..428,071.54 rows=21,403,577 width=1,132) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Hash (cost=18.10..18.10 rows=810 width=64) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on tr_blacklist b (cost=0.00..18.10 rows=810 width=64) (actual rows= loops=)