explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wSCe

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.028 ↓ 0.0 0 1

Nested Loop (cost=629.19..160,521.67 rows=294 width=1,547) (actual time=0.028..0.028 rows=0 loops=1)

  • Join Filter: (sf.id = cfb.servico_telefonia_id)
2. 0.000 0.027 ↓ 0.0 0 1

Nested Loop (cost=389.88..139,586.07 rows=1 width=1,166) (actual time=0.027..0.027 rows=0 loops=1)

  • Join Filter: (cfb.servico_telefonia_id = cfd.servico_telefonia_id)
3. 0.001 0.027 ↓ 0.0 0 1

Nested Loop (cost=389.88..139,209.52 rows=1 width=944) (actual time=0.027..0.027 rows=0 loops=1)

  • Join Filter: (cfb.servico_telefonia_id = cfr.servico_telefonia_id)
4. 0.010 0.026 ↓ 0.0 0 1

Hash Join (cost=389.88..135,741.29 rows=1 width=652) (actual time=0.026..0.026 rows=0 loops=1)

  • Hash Cond: (cfb.servico_telefonia_id = ct.servico_telefonia_id)
5. 0.009 0.009 ↑ 2,607,930.0 1 1

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

6. 0.000 0.007 ↓ 0.0 0 1

Hash (cost=389.87..389.87 rows=1 width=348) (actual time=0.007..0.007 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
7. 0.001 0.007 ↓ 0.0 0 1

Merge Join (cost=370.91..389.87 rows=1 width=348) (actual time=0.007..0.007 rows=0 loops=1)

  • Merge Cond: (ct.servico_telefonia_id = cfe.servico_telefonia_id)
8. 0.005 0.006 ↓ 0.0 0 1

Sort (cost=74.54..77.21 rows=1,070 width=48) (actual time=0.006..0.006 rows=0 loops=1)

  • Sort Key: ct.servico_telefonia_id
  • Sort Method: quicksort Memory: 25kB
9. 0.001 0.001 ↓ 0.0 0 1

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

10. 0.000 0.000 ↓ 0.0 0

Sort (cost=296.37..303.17 rows=2,720 width=300) (never executed)

  • Sort Key: cfe.servico_telefonia_id
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_contrato_fatura_endereco cfe (cost=0.00..141.20 rows=2,720 width=300) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_contrato_fatura_resumo cfr (cost=0.00..2,770.88 rows=55,788 width=292) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_contrato_fatura_desconto cfd (cost=0.00..290.69 rows=6,869 width=222) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=239.31..20,901.15 rows=2,756 width=381) (never executed)

  • Hash Cond: (cfs.servico_telefonia_id = sf.id)
15. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_contrato_fatura_servico cfs (cost=0.00..18,982.84 rows=440,384 width=268) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Hash (cost=210.32..210.32 rows=2,319 width=113) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Merge Join (cost=173.28..210.32 rows=2,319 width=113) (never executed)

  • Merge Cond: (sf.id = tt.servico_telefonia_id)
18. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_servico_telefonia_pkey on tb_servico_telefonia sf (cost=0.42..14,578.12 rows=370,513 width=76) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Sort (cost=172.81..178.61 rows=2,319 width=37) (never executed)

  • Sort Key: tt.servico_telefonia_id
20. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_telefone_telefonia tt (cost=0.00..43.19 rows=2,319 width=37) (never executed)

Planning time : 28.619 ms
Execution time : 0.456 ms