explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ydPf

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 485.352 ↑ 40.3 3 1

Sort (cost=68,074.90..68,075.20 rows=121 width=14) (actual time=485.352..485.352 rows=3 loops=1)

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

HashAggregate (cost=68,069.20..68,070.71 rows=121 width=14) (actual time=485.340..485.341 rows=3 loops=1)

  • Group Key: to_char(p.data_vencimento, 'YYYY-MM'::text), tra.origem
3. 37.114 472.671 ↑ 4.8 51,647 1

Hash Join (cost=23,654.18..66,219.09 rows=246,682 width=14) (actual time=195.237..472.671 rows=51,647 loops=1)

  • Hash Cond: (tca.t_ro_adq_id = tra.id)
4. 38.918 406.923 ↑ 4.8 51,647 1

Hash Join (cost=20,452.71..59,009.03 rows=246,682 width=12) (actual time=166.515..406.923 rows=51,647 loops=1)

  • Hash Cond: (p.t_cv_adq_id = tca.id)
5. 201.983 201.983 ↑ 4.8 51,647 1

Seq Scan on t_parcelas_adq p (cost=0.00..31,650.44 rows=246,682 width=12) (actual time=0.086..201.983 rows=51,647 loops=1)

  • Filter: ((dt_pagto IS NULL) AND (data_vencimento < date(now())))
  • Rows Removed by Filter: 838,321
6. 51.305 166.022 ↑ 1.0 282,476 1

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

  • Buckets: 131,072 Batches: 4 Memory Usage: 3,801kB
7. 114.717 114.717 ↑ 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.017..114.717 rows=282,476 loops=1)

8. 7.772 28.634 ↑ 1.0 52,910 1

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

  • Buckets: 65,536 Batches: 1 Memory Usage: 2,786kB
9. 20.862 20.862 ↑ 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..20.862 rows=52,910 loops=1)

Planning time : 0.575 ms
Execution time : 485.437 ms