explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2GCQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 3,933.293 ↑ 273.0 1 1

Nested Loop (cost=27.24..55,082.32 rows=273 width=793) (actual time=2,656.566..3,933.293 rows=1 loops=1)

  • Join Filter: (m.idcabecalho = c.idcabecalho)
  • Rows Removed by Join Filter: 21
2. 0.005 3,933.168 ↑ 273.0 1 1

Nested Loop Left Join (cost=26.10..54,989.44 rows=273 width=785) (actual time=2,656.442..3,933.168 rows=1 loops=1)

  • Join Filter: (c.idtipoexame = t.idtipoexame)
  • Rows Removed by Join Filter: 2
3. 0.586 3,933.135 ↑ 273.0 1 1

Hash Join (cost=26.10..54,976.12 rows=273 width=640) (actual time=2,656.412..3,933.135 rows=1 loops=1)

  • Hash Cond: (f.numcpf = (c.cpf)::bigint)
4. 3,932.508 3,932.508 ↑ 168.0 325 1

Foreign Scan on fdw_senior_r034fun f (cost=25.00..54,631.00 rows=54,606 width=534) (actual time=11.591..3,932.508 rows=325 loops=1)

  • Filter: ((sitafa <> 7) AND (numemp = 1) AND (tipcol = 1) AND (codfil = 68))
  • Rows Removed by Filter: 54281
5. 0.015 0.041 ↑ 1.0 1 1

Hash (cost=1.09..1.09 rows=1 width=114) (actual time=0.041..0.041 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 0.026 0.026 ↑ 1.0 1 1

Seq Scan on aso_cabecalho c (cost=0.00..1.09 rows=1 width=114) (actual time=0.025..0.026 rows=1 loops=1)

  • Filter: ((idsituacao = 3) AND (numemp = 1))
  • Rows Removed by Filter: 23
7. 0.010 0.028 ↑ 1.0 3 1

Materialize (cost=0.00..1.04 rows=3 width=149) (actual time=0.025..0.028 rows=3 loops=1)

8. 0.018 0.018 ↑ 1.0 3 1

Seq Scan on aso_tipo_exame t (cost=0.00..1.03 rows=3 width=149) (actual time=0.017..0.018 rows=3 loops=1)

9. 0.010 0.119 ↑ 1.0 22 1

Materialize (cost=1.14..2.85 rows=22 width=12) (actual time=0.101..0.119 rows=22 loops=1)

10. 0.070 0.109 ↑ 1.0 22 1

Hash Left Join (cost=1.14..2.74 rows=22 width=12) (actual time=0.096..0.109 rows=22 loops=1)

  • Hash Cond: (m.idasomovimento = a.idmovimentoaso)
11. 0.015 0.015 ↑ 1.0 22 1

Seq Scan on aso_movimento m (cost=0.00..1.49 rows=22 width=16) (actual time=0.010..0.015 rows=22 loops=1)

  • Filter: (idexame = 0)
  • Rows Removed by Filter: 22
12. 0.008 0.024 ↓ 6.0 36 1

Hash (cost=1.06..1.06 rows=6 width=4) (actual time=0.024..0.024 rows=36 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
13. 0.016 0.016 ↓ 6.0 36 1

Seq Scan on aso_anexo a (cost=0.00..1.06 rows=6 width=4) (actual time=0.009..0.016 rows=36 loops=1)