explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d4uq

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 4.372 ↑ 6.0 4 1

Sort (cost=1,732.56..1,732.62 rows=24 width=174) (actual time=4.371..4.372 rows=4 loops=1)

  • Sort Key: cartaoreceber.valor, cartaoreceber.dataemissao DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.005 4.353 ↑ 6.0 4 1

GroupAggregate (cost=1,730.69..1,732.01 rows=24 width=174) (actual time=4.350..4.353 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))
3. 0.021 4.348 ↑ 6.0 4 1

Sort (cost=1,730.69..1,730.75 rows=24 width=174) (actual time=4.346..4.348 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
4. 0.009 4.327 ↑ 6.0 4 1

Nested Loop Left Join (cost=1,586.90..1,730.14 rows=24 width=174) (actual time=4.295..4.327 rows=4 loops=1)

5. 0.001 4.314 ↓ 1.3 4 1

Nested Loop Left Join (cost=1,586.75..1,724.65 rows=3 width=128) (actual time=4.288..4.314 rows=4 loops=1)

6. 0.005 4.301 ↓ 1.3 4 1

Nested Loop (cost=1,586.47..1,699.75 rows=3 width=119) (actual time=4.283..4.301 rows=4 loops=1)

7. 0.010 4.288 ↓ 1.3 4 1

Hash Left Join (cost=1,586.20..1,674.85 rows=3 width=110) (actual time=4.279..4.288 rows=4 loops=1)

  • Hash Cond: (cartaoreceber.modalidadecartaoid = modalidadecartao.id)
8. 0.002 4.260 ↓ 1.3 4 1

Nested Loop (cost=1,584.41..1,673.02 rows=3 width=96) (actual time=4.254..4.260 rows=4 loops=1)

9. 0.022 0.022 ↑ 1.0 1 1

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

  • Filter: (id = 19471649)
  • Rows Removed by Filter: 15
10. 1.230 4.236 ↓ 1.3 4 1

Hash Right Join (cost=1,584.41..1,671.79 rows=3 width=101) (actual time=4.231..4.236 rows=4 loops=1)

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

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

12. 0.012 2.027 ↓ 1.3 4 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 2.015 2.015 ↓ 1.3 4 1

Index Scan using idx_cartaoreceber_dataemissao_unidadenegocioid_modcartaoid on cartaoreceber (cost=0.43..1,584.38 rows=3 width=93) (actual time=1.110..2.015 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: 805
14. 0.010 0.018 ↑ 1.0 35 1

Hash (cost=1.35..1.35 rows=35 width=22) (actual time=0.018..0.018 rows=35 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
15. 0.008 0.008 ↑ 1.0 35 1

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

16. 0.008 0.008 ↑ 1.0 1 4

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

  • Index Cond: (id = cartaoreceber.usuarioid)
17. 0.012 0.012 ↑ 1.0 1 4

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

  • Index Cond: (cartaoreceber.usuarioconferenciaid = id)
18. 0.004 0.004 ↓ 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.001..0.001 rows=0 loops=4)

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