explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rrKv

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

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

  • Hash Cond: (cfb.servico_telefonia_id = sf.id)
2. 622.674 622.674 ↑ 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.018..622.674 rows=2,607,930 loops=1)

3. 117.007 1,363.371 ↓ 1.5 156,129 1

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

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

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

  • Hash Cond: (cfs.servico_telefonia_id = sf.id)
5. 60.810 60.810 ↑ 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..60.810 rows=440,384 loops=1)

6. 99.283 988.418 ↓ 1.8 156,129 1

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

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

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

  • Hash Cond: (cfr.servico_telefonia_id = sf.id)
8. 8.600 8.600 ↑ 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.019..8.600 rows=55,788 loops=1)

9. 81.060 770.330 ↓ 1.8 156,129 1

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

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

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

  • Hash Cond: (cfd.servico_telefonia_id = sf.id)
11. 1.084 1.084 ↑ 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.020..1.084 rows=6,869 loops=1)

12. 66.414 612.349 ↓ 1.8 156,129 1

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

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

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

  • Hash Cond: (cfe.servico_telefonia_id = sf.id)
14. 0.528 0.528 ↑ 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.019..0.528 rows=2,720 loops=1)

15. 62.812 492.456 ↓ 1.8 156,129 1

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

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

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

  • Hash Cond: (tt.servico_telefonia_id = sf.id)
17. 0.411 0.411 ↑ 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.027..0.411 rows=2,319 loops=1)

18. 78.685 383.999 ↓ 1.8 156,129 1

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

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

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

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

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

21. 44.781 221.968 ↓ 1.8 156,129 1

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

  • Buckets: 262144 (originally 131072) Batches: 1 (originally 1) Memory Usage: 19125kB
22. 177.187 177.187 ↓ 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.035..177.187 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 : 4.904 ms
Execution time : 2,552.619 ms