explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HQp8

Settings
# exclusive inclusive rows x rows loops node
1. 0.132 17.943 ↑ 1.4 109 1

Sort (cost=10,919.72..10,920.12 rows=157 width=182) (actual time=17.937..17.943 rows=109 loops=1)

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

GroupAggregate (cost=10,905.36..10,914.00 rows=157 width=182) (actual time=17.735..17.811 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.105 17.741 ↑ 1.4 109 1

Sort (cost=10,905.36..10,905.75 rows=157 width=182) (actual time=17.729..17.741 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.211 17.636 ↑ 1.4 109 1

Nested Loop Left Join (cost=98.68..10,899.64 rows=157 width=182) (actual time=6.635..17.636 rows=109 loops=1)

5. 0.095 17.425 ↓ 5.5 109 1

Nested Loop Left Join (cost=98.53..10,869.54 rows=20 width=136) (actual time=6.619..17.425 rows=109 loops=1)

6. 0.071 17.330 ↓ 5.5 109 1

Nested Loop (cost=98.25..10,771.44 rows=20 width=127) (actual time=6.617..17.330 rows=109 loops=1)

7. 0.012 17.041 ↓ 5.5 109 1

Nested Loop Left Join (cost=97.98..10,673.34 rows=20 width=118) (actual time=6.605..17.041 rows=109 loops=1)

8. 0.016 16.702 ↓ 5.5 109 1

Nested Loop Left Join (cost=97.69..10,510.99 rows=20 width=110) (actual time=6.588..16.702 rows=109 loops=1)

9. 0.194 16.468 ↓ 5.5 109 1

Nested Loop (cost=97.55..10,495.64 rows=20 width=92) (actual time=6.583..16.468 rows=109 loops=1)

10. 10.240 16.056 ↓ 5.5 109 1

Bitmap Heap Scan on cartaoreceber (cost=97.40..10,476.24 rows=20 width=97) (actual time=6.571..16.056 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: 16891
  • Heap Blocks: exact=856
11. 5.816 5.816 ↓ 11.4 32,922 1

Bitmap Index Scan on idx_cartaoreceber_dataemissao_unidadenegocioid_modcartaoid (cost=0.00..97.40 rows=2,884 width=0) (actual time=5.816..5.816 rows=32,922 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))
12. 0.218 0.218 ↑ 1.0 1 109

Index Scan using pk_unidadenegocio on unidadenegocio (cost=0.14..0.96 rows=1 width=11) (actual time=0.001..0.002 rows=1 loops=109)

  • Index Cond: (id = cartaoreceber.unidadenegocioid)
13. 0.218 0.218 ↑ 1.0 1 109

Index Scan using pk_modalidadecartao on modalidadecartao (cost=0.14..0.76 rows=1 width=26) (actual time=0.001..0.002 rows=1 loops=109)

  • Index Cond: (cartaoreceber.modalidadecartaoid = id)
14. 0.327 0.327 ↓ 0.0 0 109

Index Scan using xidx_ocorrenciacartaoreceber_cartaoreceberid on ocorrenciacartaoreceber (cost=0.29..8.11 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=109)

  • Index Cond: (cartaoreceber.id = cartaoreceberid)
15. 0.218 0.218 ↑ 1.0 1 109

Index Scan using pk_usuario on usuario (cost=0.28..4.89 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=109)

  • Index Cond: (id = cartaoreceber.usuarioid)
16. 0.000 0.000 ↓ 0.0 0 109

Index Scan using pk_usuario on usuario usuarioconferencia (cost=0.28..4.89 rows=1 width=25) (actual time=0.000..0.000 rows=0 loops=109)

  • Index Cond: (cartaoreceber.usuarioconferenciaid = id)
17. 0.000 0.000 ↓ 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.000..0.000 rows=0 loops=109)

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