explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9TKt

Settings
# exclusive inclusive rows x rows loops node
1. 519.800 2,569.191 ↑ 4.6 156,129 1

Hash Right Join (cost=44,344.14..186,878.10 rows=719,689 width=1,547) (actual time=2,390.044..2,569.191 rows=156,129 loops=1)

  • Hash Cond: (cfb.servico_telefonia_id = sf.id)
2. 640.932 640.932 ↑ 1.0 2,607,930 1

Seq Scan on tb_contrato_fatura_bilhetacao cfb (cost=0.00..125,557.30 rows=2,607,930 width=304) (actual time=0.081..640.932 rows=2,607,930 loops=1)

3. 165.304 1,408.459 ↓ 1.5 156,129 1

Hash (cost=43,066.04..43,066.04 rows=102,248 width=1,243) (actual time=1,408.459..1,408.459 rows=156,129 loops=1)

  • Buckets: 262144 (originally 131072) Batches: 1 (originally 1) Memory Usage: 22784kB
4. 255.690 1,243.155 ↓ 1.5 156,129 1

Hash Right Join (cost=21,409.28..43,066.04 rows=102,248 width=1,243) (actual time=1,042.955..1,243.155 rows=156,129 loops=1)

  • Hash Cond: (cfs.servico_telefonia_id = sf.id)
5. 62.145 62.145 ↑ 1.0 440,384 1

Seq Scan on tb_contrato_fatura_servico cfs (cost=0.00..18,982.84 rows=440,384 width=268) (actual time=0.018..62.145 rows=440,384 loops=1)

6. 99.318 925.320 ↓ 1.8 156,129 1

Hash (cost=20,333.96..20,333.96 rows=86,025 width=975) (actual time=925.320..925.320 rows=156,129 loops=1)

  • Buckets: 262144 (originally 131072) Batches: 1 (originally 1) Memory Usage: 21565kB
7. 109.465 826.002 ↓ 1.8 156,129 1

Hash Right Join (cost=17,353.87..20,333.96 rows=86,025 width=975) (actual time=719.865..826.002 rows=156,129 loops=1)

  • Hash Cond: (cfr.servico_telefonia_id = sf.id)
8. 9.525 9.525 ↑ 1.0 55,788 1

Seq Scan on tb_contrato_fatura_resumo cfr (cost=0.00..2,770.88 rows=55,788 width=292) (actual time=0.018..9.525 rows=55,788 loops=1)

9. 81.375 707.012 ↓ 1.8 156,129 1

Hash (cost=16,278.56..16,278.56 rows=86,025 width=683) (actual time=707.012..707.012 rows=156,129 loops=1)

  • Buckets: 262144 (originally 131072) Batches: 1 (originally 1) Memory Usage: 21565kB
10. 76.497 625.637 ↓ 1.8 156,129 1

Hash Right Join (cost=15,962.10..16,278.56 rows=86,025 width=683) (actual time=549.714..625.637 rows=156,129 loops=1)

  • Hash Cond: (cfd.servico_telefonia_id = sf.id)
11. 0.912 0.912 ↑ 1.0 6,869 1

Seq Scan on tb_contrato_fatura_desconto cfd (cost=0.00..290.69 rows=6,869 width=222) (actual time=0.019..0.912 rows=6,869 loops=1)

12. 67.226 548.228 ↓ 1.8 156,129 1

Hash (cost=14,886.78..14,886.78 rows=86,025 width=461) (actual time=548.228..548.228 rows=156,129 loops=1)

  • Buckets: 262144 (originally 131072) Batches: 1 (originally 1) Memory Usage: 20345kB
13. 54.616 481.002 ↓ 1.8 156,129 1

Hash Right Join (cost=14,735.37..14,886.78 rows=86,025 width=461) (actual time=426.756..481.002 rows=156,129 loops=1)

  • Hash Cond: (cfe.servico_telefonia_id = sf.id)
14. 1.072 1.072 ↑ 1.0 2,720 1

Seq Scan on tb_contrato_fatura_endereco cfe (cost=0.00..141.20 rows=2,720 width=300) (actual time=0.046..1.072 rows=2,720 loops=1)

15. 53.855 425.314 ↓ 1.8 156,129 1

Hash (cost=13,660.06..13,660.06 rows=86,025 width=161) (actual time=425.314..425.314 rows=156,129 loops=1)

  • Buckets: 262144 (originally 131072) Batches: 1 (originally 1) Memory Usage: 20345kB
16. 38.041 371.459 ↓ 1.8 156,129 1

Hash Right Join (cost=13,602.80..13,660.06 rows=86,025 width=161) (actual time=333.891..371.459 rows=156,129 loops=1)

  • Hash Cond: (tt.servico_telefonia_id = sf.id)
17. 0.406 0.406 ↑ 1.0 2,319 1

Seq Scan on tb_telefone_telefonia tt (cost=0.00..43.19 rows=2,319 width=37) (actual time=0.055..0.406 rows=2,319 loops=1)

18. 53.202 333.012 ↓ 1.8 156,129 1

Hash (cost=12,527.48..12,527.48 rows=86,025 width=124) (actual time=333.012..333.012 rows=156,129 loops=1)

  • Buckets: 262144 (originally 131072) Batches: 1 (originally 1) Memory Usage: 20345kB
19. 62.369 279.810 ↓ 1.8 156,129 1

Hash Right Join (cost=12,500.29..12,527.48 rows=86,025 width=124) (actual time=217.658..279.810 rows=156,129 loops=1)

  • Hash Cond: (ct.servico_telefonia_id = sf.id)
20. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on tb_contrato_telefonia ct (cost=0.00..20.70 rows=1,070 width=48) (actual time=0.003..0.003 rows=0 loops=1)

21. 43.493 217.438 ↓ 1.8 156,129 1

Hash (cost=11,424.98..11,424.98 rows=86,025 width=76) (actual time=217.438..217.438 rows=156,129 loops=1)

  • Buckets: 262144 (originally 131072) Batches: 1 (originally 1) Memory Usage: 19125kB
22. 173.945 173.945 ↓ 1.8 156,129 1

Seq Scan on tb_servico_telefonia sf (cost=0.00..11,424.98 rows=86,025 width=76) (actual time=0.036..173.945 rows=156,129 loops=1)

  • Filter: ((id <> 65) AND ((cod_febrabam)::text = 'LOC'::text) AND ((nm_servico_telefonia)::text = 'CHAM.LOC.DDR MI '::text))
  • Rows Removed by Filter: 214384
Planning time : 6.182 ms
Execution time : 2,591.595 ms