explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8uNH

Settings
# exclusive inclusive rows x rows loops node
1. 0.154 19.431 ↑ 1.4 109 1

Sort (cost=11,988.84..11,989.23 rows=157 width=182) (actual time=19.422..19.431 rows=109 loops=1)

  • Sort Key: cartaoreceber.valor, cartaoreceber.dataemissao DESC
  • Sort Method: quicksort Memory: 48kB
2. 0.059 19.277 ↑ 1.4 109 1

GroupAggregate (cost=11,974.48..11,983.11 rows=157 width=182) (actual time=19.213..19.277 rows=109 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.084 19.218 ↑ 1.4 109 1

Sort (cost=11,974.48..11,974.87 rows=157 width=182) (actual time=19.207..19.218 rows=109 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: 43kB
4. 0.070 19.134 ↑ 1.4 109 1

Nested Loop Left Join (cost=10,612.01..11,968.75 rows=157 width=182) (actual time=18.812..19.134 rows=109 loops=1)

5. 0.036 18.955 ↓ 5.5 109 1

Hash Left Join (cost=10,611.86..11,938.65 rows=20 width=136) (actual time=18.795..18.955 rows=109 loops=1)

  • Hash Cond: (cartaoreceber.usuarioconferenciaid = usuarioconferencia.id)
6. 0.049 18.386 ↓ 5.5 109 1

Hash Join (cost=10,546.98..11,873.56 rows=20 width=127) (actual time=18.252..18.386 rows=109 loops=1)

  • Hash Cond: (cartaoreceber.usuarioid = usuario.id)
7. 0.042 17.793 ↓ 5.5 109 1

Hash Left Join (cost=10,482.09..11,808.40 rows=20 width=118) (actual time=17.700..17.793 rows=109 loops=1)

  • Hash Cond: (cartaoreceber.modalidadecartaoid = modalidadecartao.id)
8. 0.041 17.729 ↓ 5.5 109 1

Hash Join (cost=10,480.03..11,806.07 rows=20 width=100) (actual time=17.666..17.729 rows=109 loops=1)

  • Hash Cond: (cartaoreceber.unidadenegocioid = unidadenegocio.id)
9. 5.096 17.665 ↓ 5.5 109 1

Hash Right Join (cost=10,476.48..11,802.24 rows=20 width=105) (actual time=17.630..17.665 rows=109 loops=1)

  • Hash Cond: (ocorrenciacartaoreceber.cartaoreceberid = cartaoreceber.id)
10. 3.456 3.456 ↑ 1.0 53,839 1

Seq Scan on ocorrenciacartaoreceber (cost=0.00..1,121.82 rows=54,382 width=16) (actual time=0.004..3.456 rows=53,839 loops=1)

11. 0.063 9.113 ↓ 5.5 109 1

Hash (cost=10,476.23..10,476.23 rows=20 width=97) (actual time=9.113..9.113 rows=109 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 22kB
12. 6.545 9.050 ↓ 5.5 109 1

Bitmap Heap Scan on cartaoreceber (cost=97.40..10,476.23 rows=20 width=97) (actual time=2.695..9.050 rows=109 loops=1)

  • Recheck Cond: ((dataemissao >= '2019-08-05 16:09:55'::timestamp without time zone) AND (dataemissao <= '2019-08-11 16:09:55'::timestamp without time zone))
  • Filter: ((valor >= 2.92) AND (valor <= 3.92))
  • Rows Removed by Filter: 16870
  • Heap Blocks: exact=854
13. 2.505 2.505 ↓ 11.4 32,825 1

Bitmap Index Scan on idx_cartaoreceber_dataemissao_unidadenegocioid_modcartaoid (cost=0.00..97.40 rows=2,884 width=0) (actual time=2.505..2.505 rows=32,825 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))
14. 0.012 0.023 ↑ 1.0 69 1

Hash (cost=2.69..2.69 rows=69 width=11) (actual time=0.023..0.023 rows=69 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
15. 0.011 0.011 ↑ 1.0 69 1

Seq Scan on unidadenegocio (cost=0.00..2.69 rows=69 width=11) (actual time=0.002..0.011 rows=69 loops=1)

16. 0.009 0.022 ↑ 1.0 47 1

Hash (cost=1.47..1.47 rows=47 width=26) (actual time=0.022..0.022 rows=47 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
17. 0.013 0.013 ↑ 1.0 47 1

Seq Scan on modalidadecartao (cost=0.00..1.47 rows=47 width=26) (actual time=0.004..0.013 rows=47 loops=1)

18. 0.285 0.544 ↓ 1.0 1,520 1

Hash (cost=46.06..46.06 rows=1,506 width=25) (actual time=0.544..0.544 rows=1,520 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 109kB
19. 0.259 0.259 ↓ 1.0 1,520 1

Seq Scan on usuario (cost=0.00..46.06 rows=1,506 width=25) (actual time=0.006..0.259 rows=1,520 loops=1)

20. 0.282 0.533 ↓ 1.0 1,520 1

Hash (cost=46.06..46.06 rows=1,506 width=25) (actual time=0.533..0.533 rows=1,520 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 109kB
21. 0.251 0.251 ↓ 1.0 1,520 1

Seq Scan on usuario usuarioconferencia (cost=0.00..46.06 rows=1,506 width=25) (actual time=0.004..0.251 rows=1,520 loops=1)

22. 0.109 0.109 ↓ 0.0 0 109

Index Only Scan using uidx_modalidadecartaooperadora_modalidadecartaoid_operadora on modalidadecartaooperadora (cost=0.15..1.23 rows=8 width=8) (actual time=0.001..0.001 rows=0 loops=109)

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