explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gtCM

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 402.758 ↑ 39.3 3 1

Sort (cost=63,333.26..63,333.55 rows=118 width=14) (actual time=402.758..402.758 rows=3 loops=1)

  • Sort Key: (to_char(p.data_vencimento, 'YYYY-MM'::text))
  • Sort Method: quicksort Memory: 25kB
2. 10.634 402.747 ↑ 39.3 3 1

HashAggregate (cost=63,327.72..63,329.20 rows=118 width=14) (actual time=402.746..402.747 rows=3 loops=1)

  • Group Key: to_char(p.data_vencimento, 'YYYY-MM'::text), tra.origem
3. 30.526 392.113 ↑ 6.1 39,748 1

Hash Join (cost=23,654.18..61,523.93 rows=240,505 width=14) (actual time=186.214..392.113 rows=39,748 loops=1)

  • Hash Cond: (tca.t_ro_adq_id = tra.id)
4. 37.451 331.436 ↑ 6.1 39,748 1

Hash Join (cost=20,452.71..54,414.25 rows=240,505 width=12) (actual time=155.989..331.436 rows=39,748 loops=1)

  • Hash Cond: (p.t_cv_adq_id = tca.id)
5. 138.863 138.863 ↑ 6.1 39,748 1

Seq Scan on t_parcelas_adq p (cost=0.00..27,200.60 rows=240,505 width=12) (actual time=0.091..138.863 rows=39,748 loops=1)

  • Filter: ((dt_pagto IS NULL) AND (data_vencimento < '2020-09-13 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 850,220
6. 47.675 155.122 ↑ 1.0 282,476 1

Hash (cost=15,817.76..15,817.76 rows=282,476 width=8) (actual time=155.122..155.122 rows=282,476 loops=1)

  • Buckets: 131,072 Batches: 4 Memory Usage: 3,801kB
7. 107.447 107.447 ↑ 1.0 282,476 1

Seq Scan on t_cv_adq tca (cost=0.00..15,817.76 rows=282,476 width=8) (actual time=0.010..107.447 rows=282,476 loops=1)

8. 7.876 30.151 ↑ 1.0 52,910 1

Hash (cost=2,540.10..2,540.10 rows=52,910 width=10) (actual time=30.151..30.151 rows=52,910 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 2,786kB
9. 22.275 22.275 ↑ 1.0 52,910 1

Seq Scan on t_ro_adq tra (cost=0.00..2,540.10 rows=52,910 width=10) (actual time=0.005..22.275 rows=52,910 loops=1)

Planning time : 0.539 ms
Execution time : 402.830 ms