explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zc3k

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=77,780.27..77,780.27 rows=1 width=38) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=77,780.27..77,780.80 rows=210 width=38) (actual rows= loops=)

  • Sort Key: (max(vr.created_at)) DESC
3. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=77,775.55..77,779.22 rows=210 width=38) (actual rows= loops=)

  • Group Key: vr.nome_arquivo
4. 0.000 0.000 ↓ 0.0

Sort (cost=77,775.55..77,776.07 rows=210 width=38) (actual rows= loops=)

  • Sort Key: vr.nome_arquivo
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,079.45..77,767.45 rows=210 width=38) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,079.01..77,671.78 rows=200 width=42) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,078.86..77,637.28 rows=200 width=44) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on ve_licenciamento_status ls (cost=0.00..1.11 rows=1 width=2) (actual rows= loops=)

  • Filter: (id = 8)
9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,078.86..77,634.17 rows=200 width=46) (actual rows= loops=)

  • Join Filter: (v.rv_ano_licenciamento = (l.ve_ano_exercicio)::double precision)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,078.30..48,940.75 rows=34,552 width=67) (actual rows= loops=)

  • Join Filter: (la.rv_cod_atendimento = v.rv_cod_atendimento)
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,077.87..27,310.51 rows=34,552 width=63) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,077.43..7,288.57 rows=34,552 width=42) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,077.00..3,055.91 rows=299 width=42) (actual rows= loops=)

  • Hash Cond: (vr.id = rl.remessa_id)
14. 0.000 0.000 ↓ 0.0

Seq Scan on remessa vr (cost=0.00..1,885.13 rows=538 width=42) (actual rows= loops=)

  • Filter: ((canceled_at IS NULL) AND ((nome_arquivo)::text ~~* '%CRLV%'::text) AND (empresa_id = 8))
15. 0.000 0.000 ↓ 0.0

Hash (cost=712.00..712.00 rows=29,200 width=8) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on remessa_lotes rl (cost=0.00..712.00 rows=29,200 width=8) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Index Scan using idx_rv_lote_atendimento_rv_num_lote2 on rv_lote_atendimento la (cost=0.43..13.00 rows=116 width=8) (actual rows= loops=)

  • Index Cond: (rv_num_lote = rl.numero_lote)
18. 0.000 0.000 ↓ 0.0

Index Scan using rv_atendimento_pkey on rv_atendimento a (cost=0.43..0.57 rows=1 width=21) (actual rows= loops=)

  • Index Cond: (rv_cod_atendimento = la.rv_cod_atendimento)
19. 0.000 0.000 ↓ 0.0

Index Scan using rv_veiculo_atendimento_pkey on rv_veiculo_atendimento v (cost=0.43..0.61 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (rv_cod_atendimento = a.rv_cod_atendimento)
20. 0.000 0.000 ↓ 0.0

Index Scan using ve_licenciamento_pk on ve_licenciamento l (cost=0.56..0.82 rows=1 width=25) (actual rows= loops=)

  • Index Cond: ((ve_chassi)::text = (a.rv_num_chassi)::text)
  • Filter: (ve_status = 8)
21. 0.000 0.000 ↓ 0.0

Index Only Scan using ve_impedimento_dual_pk on ve_impedimento_dual lid (cost=0.14..0.16 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = l.ve_impedimento)
22. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_vdoc_num_atendimento_doc4 on ve_documento d (cost=0.44..0.47 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (ve_num_atendimento_doc = (la.rv_cod_atendimento)::double precision)