explain.depesz.com

PostgreSQL's explain analyze made readable

Result: V4RA

Settings
# exclusive inclusive rows x rows loops node
1. 3,969.271 29,543.915 ↑ 1.0 1,763,833 1

Hash Left Join (cost=612,916.85..840,596.80 rows=1,763,865 width=439) (actual time=17,487.835..29,543.915 rows=1,763,833 loops=1)

  • Hash Cond: (c.pessoa = ps.codigo)
2. 1,295.277 25,200.483 ↑ 1.0 1,763,833 1

Hash Left Join (cost=590,271.43..745,522.97 rows=1,763,865 width=410) (actual time=17,113.396..25,200.483 rows=1,763,833 loops=1)

  • Hash Cond: (c.centroreceita = cr.codigo)
3. 1,225.742 23,905.064 ↑ 1.0 1,763,833 1

Hash Left Join (cost=590,265.95..721,264.35 rows=1,763,865 width=372) (actual time=17,113.237..23,905.064 rows=1,763,833 loops=1)

  • Hash Cond: (rb.formapagamento = fp.codigo)
4. 1,707.598 22,679.298 ↑ 1.0 1,763,833 1

Hash Left Join (cost=590,264.66..697,009.91 rows=1,763,865 width=358) (actual time=17,113.195..22,679.298 rows=1,763,833 loops=1)

  • Hash Cond: (c.turma = tr.codigo)
5. 1,698.866 20,968.272 ↑ 1.0 1,763,833 1

Hash Left Join (cost=590,060.19..665,938.98 rows=1,763,865 width=349) (actual time=17,109.739..20,968.272 rows=1,763,833 loops=1)

  • Hash Cond: (c.codigo = r.contareceber)
6. 2,092.968 18,133.418 ↑ 1.0 1,763,833 1

Hash Right Join (cost=547,090.24..601,677.03 rows=1,763,865 width=212) (actual time=15,973.607..18,133.418 rows=1,763,833 loops=1)

  • Hash Cond: (neg.contareceber = c.codigo)
7. 72.587 72.587 ↑ 1.0 110,535 1

Seq Scan on registronegativacaocobrancacontareceberitem neg (cost=0.00..5,344.35 rows=110,535 width=24) (actual time=0.010..72.587 rows=110,535 loops=1)

8. 2,209.620 15,967.863 ↑ 1.0 1,763,545 1

Hash (cost=478,532.93..478,532.93 rows=1,763,865 width=192) (actual time=15,967.863..15,967.863 rows=1,763,545 loops=1)

  • Buckets: 131,072 Batches: 4 (originally 2) Memory Usage: 204,801kB
9. 4,881.357 13,758.243 ↑ 1.0 1,763,545 1

Hash Join (cost=317,933.01..478,532.93 rows=1,763,865 width=192) (actual time=7,682.415..13,758.243 rows=1,763,545 loops=1)

  • Hash Cond: (rb.contareceber = c.codigo)
10. 1,197.426 1,197.426 ↑ 1.0 1,763,545 1

Seq Scan on contareceberrecebimento rb (cost=0.00..42,247.45 rows=1,763,865 width=28) (actual time=0.660..1,197.426 rows=1,763,545 loops=1)

  • Filter: (formapagamentonegociacaorecebimento > 0)
  • Rows Removed by Filter: 4,091
11. 2,671.949 7,679.460 ↑ 1.0 2,608,033 1

Hash (cost=224,148.45..224,148.45 rows=2,609,645 width=168) (actual time=7,679.460..7,679.460 rows=2,608,033 loops=1)

  • Buckets: 131,072 Batches: 4 Memory Usage: 135,025kB
12. 5,007.511 5,007.511 ↑ 1.0 2,608,033 1

Seq Scan on contareceber c (cost=0.00..224,148.45 rows=2,609,645 width=168) (actual time=0.025..5,007.511 rows=2,608,033 loops=1)

13. 159.426 1,135.988 ↑ 1.0 214,311 1

Hash (cost=40,291.06..40,291.06 rows=214,311 width=145) (actual time=1,135.988..1,135.988 rows=214,311 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 40,850kB
14. 278.731 976.562 ↑ 1.0 214,311 1

Hash Left Join (cost=30,829.06..40,291.06 rows=214,311 width=145) (actual time=648.667..976.562 rows=214,311 loops=1)

  • Hash Cond: (r.negociacaocontareceber = n.codigo)
15. 49.221 49.221 ↑ 1.0 214,311 1

Seq Scan on contarecebernegociado r (cost=0.00..4,372.11 rows=214,311 width=22) (actual time=0.004..49.221 rows=214,311 loops=1)

16. 56.905 648.610 ↑ 1.0 74,529 1

Hash (cost=29,897.45..29,897.45 rows=74,529 width=123) (actual time=648.610..648.610 rows=74,529 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 11,408kB
17. 87.124 591.705 ↑ 1.0 74,529 1

Hash Left Join (cost=22,645.41..29,897.45 rows=74,529 width=123) (actual time=427.424..591.705 rows=74,529 loops=1)

  • Hash Cond: (n.responsavel = p.codigo)
18. 77.964 77.964 ↑ 1.0 74,529 1

Seq Scan on negociacaocontareceber n (cost=0.00..5,668.29 rows=74,529 width=98) (actual time=0.533..77.964 rows=74,529 loops=1)

19. 192.323 426.617 ↑ 1.0 464,374 1

Hash (cost=16,840.74..16,840.74 rows=464,374 width=29) (actual time=426.617..426.617 rows=464,374 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 28,754kB
20. 234.294 234.294 ↑ 1.0 464,374 1

Seq Scan on pessoa p (cost=0.00..16,840.74 rows=464,374 width=29) (actual time=0.005..234.294 rows=464,374 loops=1)

21. 1.701 3.428 ↑ 1.0 4,510 1

Hash (cost=148.10..148.10 rows=4,510 width=13) (actual time=3.428..3.428 rows=4,510 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 213kB
22. 1.727 1.727 ↑ 1.0 4,510 1

Seq Scan on turma tr (cost=0.00..148.10 rows=4,510 width=13) (actual time=0.004..1.727 rows=4,510 loops=1)

23. 0.008 0.024 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=18) (actual time=0.024..0.024 rows=13 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 1kB
24. 0.016 0.016 ↑ 1.0 13 1

Seq Scan on formapagamento fp (cost=0.00..1.13 rows=13 width=18) (actual time=0.008..0.016 rows=13 loops=1)

25. 0.007 0.142 ↑ 1.0 37 1

Hash (cost=5.02..5.02 rows=37 width=42) (actual time=0.142..0.142 rows=37 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 3kB
26. 0.031 0.135 ↑ 1.0 37 1

Hash Left Join (cost=3.14..5.02 rows=37 width=42) (actual time=0.100..0.135 rows=37 loops=1)

  • Hash Cond: (cr.departamento = dp.codigo)
27. 0.019 0.019 ↑ 1.0 37 1

Seq Scan on centroreceita cr (cost=0.00..1.37 rows=37 width=28) (actual time=0.003..0.019 rows=37 loops=1)

28. 0.029 0.085 ↑ 1.0 95 1

Hash (cost=1.95..1.95 rows=95 width=22) (actual time=0.085..0.085 rows=95 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 6kB
29. 0.056 0.056 ↑ 1.0 95 1

Seq Scan on departamento dp (cost=0.00..1.95 rows=95 width=22) (actual time=0.004..0.056 rows=95 loops=1)

30. 165.708 374.161 ↑ 1.0 464,374 1

Hash (cost=16,840.74..16,840.74 rows=464,374 width=29) (actual time=374.161..374.161 rows=464,374 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 28,074kB
31. 208.453 208.453 ↑ 1.0 464,374 1

Seq Scan on pessoa ps (cost=0.00..16,840.74 rows=464,374 width=29) (actual time=0.004..208.453 rows=464,374 loops=1)

Planning time : 32.533 ms
Execution time : 29,857.397 ms