explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R3s

Settings
# exclusive inclusive rows x rows loops node
1. 4.061 525,657.157 ↑ 1.1 1,898 1

Sort (cost=124,648.97..124,654.07 rows=2,039 width=18) (actual time=525,655.589..525,657.157 rows=1,898 loops=1)

  • Sort Key: (date(parcelas.dt_pagto)), erp.tp_servico
  • Sort Method: quicksort Memory: 137kB
2. 272.674 525,653.096 ↑ 1.1 1,898 1

HashAggregate (cost=124,511.41..124,536.89 rows=2,039 width=18) (actual time=525,651.157..525,653.096 rows=1,898 loops=1)

  • Group Key: date(parcelas.dt_pagto), erp.tp_servico, erp.cod_emp
3. 518.930 525,380.422 ↓ 1.2 176,904 1

Hash Join (cost=100,248.75..123,364.50 rows=152,921 width=18) (actual time=340,918.867..525,380.422 rows=176,904 loops=1)

  • Hash Cond: (parcelas.t_cv_erp_id = erp.id)
4. 184,257.637 184,257.637 ↑ 1.8 189,039 1

Index Scan using t_parc_erp_t_arq_ret_baixa_idx on t_parcelas_erp parcelas (cost=0.43..19,953.53 rows=333,635 width=12) (actual time=310.216..184,257.637 rows=189,039 loops=1)

  • Index Cond: (t_arq_retorno_id_baixa IS NULL)
  • Filter: ((fl_conc_pagto)::text ~~ 'LIQUIDADO%'::text)
  • Rows Removed by Filter: 236602
5. 969.356 340,603.855 ↑ 1.0 673,109 1

Hash (cost=91,824.26..91,824.26 rows=673,925 width=14) (actual time=340,603.855..340,603.855 rows=673,109 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 39744kB
6. 339,634.499 339,634.499 ↑ 1.0 673,109 1

Index Scan using t_cv_erp_origem_id1 on t_cv_erp erp (cost=0.43..91,824.26 rows=673,925 width=14) (actual time=75.431..339,634.499 rows=673,109 loops=1)

  • Index Cond: ((origem)::text = 'CIELO'::text)