explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gTWr

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

CTE Scan on connections (cost=4,980,368.47..4,980,424.49 rows=2,801 width=116) (actual rows= loops=)

2.          

CTE connections

3. 0.000 0.000 ↓ 0.0

Recursive Union (cost=1,000.86..4,980,368.47 rows=2,801 width=104) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Limit (cost=1,000.86..4,710.35 rows=1 width=104) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.86..8,419.84 rows=2 width=104) (actual rows= loops=)

  • Workers Planned: 2
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.85..7,419.60 rows=1 width=104) (actual rows= loops=)

  • Join Filter: (o.id_porta_2 IS NOT NULL)
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.43..7,411.10 rows=1 width=34) (actual rows= loops=)

  • Join Filter: (o.id_porta_1 IS NOT NULL)
8. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on conexao o (cost=0.00..7,402.65 rows=1 width=28) (actual rows= loops=)

  • Filter: ((id_fibra_1 = 409,447) OR (id_fibra_2 = 409,447))
9. 0.000 0.000 ↓ 0.0

Index Scan using porta_pk on porta door1 (cost=0.43..8.45 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (id = o.id_porta_1)
10. 0.000 0.000 ↓ 0.0

Index Scan using porta_pk on porta door2 (cost=0.43..8.45 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (id = o.id_porta_2)
11. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=89,055.77..497,560.21 rows=280 width=104) (actual rows= loops=)

  • Hash Cond: (x.id_porta_2 = door2_1.id)
  • Join Filter: (x.id_porta_1 IS NOT NULL)
  • Filter: (((door1_1.id_equipamento_interno = t.eqdoor2id) AND (((door1_1.id_equipamento_interno)::text || (door1_1.tipo)::text) <> ALL (t.porttypes))) OR ((door2_1.id_equipamento_interno = t.eqdoor2id) AND (((door2_1.id_equipamento_interno): (...)
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=44,527.88..243,672.26 rows=5,373,740 width=114) (actual rows= loops=)

  • Join Filter: (x.id <> ALL (t.ancestors))
13. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=44,527.88..69,022.36 rows=537,384 width=34) (actual rows= loops=)

  • Hash Cond: (x.id_porta_1 = door1_1.id)
  • Join Filter: (x.id_porta_1 IS NOT NULL)
14. 0.000 0.000 ↓ 0.0

Seq Scan on conexao x (cost=0.00..9,417.84 rows=537,384 width=28) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash (cost=22,036.06..22,036.06 rows=1,293,906 width=10) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on porta door1_1 (cost=0.00..22,036.06 rows=1,293,906 width=10) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

WorkTable Scan on connections t (cost=0.00..0.20 rows=10 width=80) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=22,036.06..22,036.06 rows=1,293,906 width=10) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on porta door2_1 (cost=0.00..22,036.06 rows=1,293,906 width=10) (actual rows= loops=)