explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aiOg

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 10.463 ↑ 2.5 4 1

Limit (cost=1,733.69..1,733.71 rows=10 width=174) (actual time=10.459..10.463 rows=4 loops=1)

2. 0.028 10.458 ↑ 6.0 4 1

Sort (cost=1,733.69..1,733.75 rows=24 width=174) (actual time=10.457..10.458 rows=4 loops=1)

  • Sort Key: cartaoreceber.valor, cartaoreceber.dataemissao DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.021 10.430 ↑ 6.0 4 1

GroupAggregate (cost=1,731.85..1,733.17 rows=24 width=174) (actual time=10.420..10.430 rows=4 loops=1)

  • Group Key: cartaoreceber.id, unidadenegocio.codigo, ((((cartaoreceber.numeroparcela)::text || '/'::text) || (cartaoreceber.totalparcela)::text)), modalidadecartao.nome, ((((usuario.login)::text || '-'::text) || (usuario.apelido)::text)), ((((usuarioconferencia.login)::text || '-'::text) || (usuarioconferencia.apelido)::text))
4. 0.032 10.409 ↑ 6.0 4 1

Sort (cost=1,731.85..1,731.91 rows=24 width=174) (actual time=10.407..10.409 rows=4 loops=1)

  • Sort Key: cartaoreceber.id, unidadenegocio.codigo, ((((cartaoreceber.numeroparcela)::text || '/'::text) || (cartaoreceber.totalparcela)::text)), modalidadecartao.nome, ((((usuario.login)::text || '-'::text) || (usuario.apelido)::text)), ((((usuarioconferencia.login)::text || '-'::text) || (usuarioconferencia.apelido)::text))
  • Sort Method: quicksort Memory: 25kB
5. 0.047 10.377 ↑ 6.0 4 1

Nested Loop Left Join (cost=1,585.09..1,731.30 rows=24 width=174) (actual time=10.141..10.377 rows=4 loops=1)

6. 0.015 10.318 ↓ 1.3 4 1

Nested Loop Left Join (cost=1,584.93..1,725.81 rows=3 width=128) (actual time=10.113..10.318 rows=4 loops=1)

7. 0.020 10.263 ↓ 1.3 4 1

Nested Loop (cost=1,584.66..1,700.91 rows=3 width=119) (actual time=10.087..10.263 rows=4 loops=1)

8. 0.096 10.199 ↓ 1.3 4 1

Nested Loop Left Join (cost=1,584.39..1,676.01 rows=3 width=110) (actual time=10.062..10.199 rows=4 loops=1)

  • Join Filter: (cartaoreceber.modalidadecartaoid = modalidadecartao.id)
  • Rows Removed by Join Filter: 136
9. 0.010 9.995 ↓ 1.3 4 1

Nested Loop (cost=1,584.39..1,673.00 rows=3 width=96) (actual time=9.972..9.995 rows=4 loops=1)

10. 0.022 0.022 ↑ 1.0 1 1

Seq Scan on unidadenegocio (cost=0.00..1.20 rows=1 width=11) (actual time=0.019..0.022 rows=1 loops=1)

  • Filter: (id = 19471649)
  • Rows Removed by Filter: 15
11. 1.374 9.963 ↓ 1.3 4 1

Hash Right Join (cost=1,584.39..1,671.77 rows=3 width=101) (actual time=9.949..9.963 rows=4 loops=1)

  • Hash Cond: (ocorrenciacartaoreceber.cartaoreceberid = cartaoreceber.id)
12. 1.092 1.092 ↓ 1.0 3,464 1

Seq Scan on ocorrenciacartaoreceber (cost=0.00..74.45 rows=3,445 width=16) (actual time=0.008..1.092 rows=3,464 loops=1)

13. 0.023 7.497 ↓ 1.3 4 1

Hash (cost=1,584.35..1,584.35 rows=3 width=93) (actual time=7.497..7.497 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 7.474 7.474 ↓ 1.3 4 1

Index Scan using idx_cartaoreceber_dataemissao_unidadenegocioid_modcartaoid on cartaoreceber (cost=0.43..1,584.35 rows=3 width=93) (actual time=4.948..7.474 rows=4 loops=1)

  • Index Cond: ((dataemissao >= '2019-08-05 16:09:55'::timestamp without time zone) AND (dataemissao <= '2019-08-11 16:09:55'::timestamp without time zone) AND (unidadenegocioid = 19471649))
  • Filter: ((valor >= 2.92) AND (valor <= 3.92))
  • Rows Removed by Filter: 804
15. 0.078 0.108 ↑ 1.0 35 4

Materialize (cost=0.00..1.53 rows=35 width=22) (actual time=0.003..0.027 rows=35 loops=4)

16. 0.030 0.030 ↑ 1.0 35 1

Seq Scan on modalidadecartao (cost=0.00..1.35 rows=35 width=22) (actual time=0.006..0.030 rows=35 loops=1)

17. 0.044 0.044 ↑ 1.0 1 4

Index Scan using pk_usuario on usuario (cost=0.27..8.29 rows=1 width=25) (actual time=0.009..0.011 rows=1 loops=4)

  • Index Cond: (id = cartaoreceber.usuarioid)
18. 0.040 0.040 ↑ 1.0 1 4

Index Scan using pk_usuario on usuario usuarioconferencia (cost=0.27..8.29 rows=1 width=25) (actual time=0.009..0.010 rows=1 loops=4)

  • Index Cond: (cartaoreceber.usuarioconferenciaid = id)
19. 0.012 0.012 ↓ 0.0 0 4

Index Only Scan using uidx_modalidadecartaooperadora_modalidadecartaoid_operadora on modalidadecartaooperadora (cost=0.15..1.55 rows=8 width=8) (actual time=0.003..0.003 rows=0 loops=4)

  • Index Cond: (modalidadecartaoid = modalidadecartao.id)
  • Heap Fetches: 0
Planning time : 4.588 ms
Execution time : 10.724 ms