explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WuqN

Settings
# exclusive inclusive rows x rows loops node
1. 0.757 17,818.555 ↑ 1.0 3 1

Index Scan using xifesajclasse on esajclasse c (cost=0.28..28,474.94 rows=3 width=73) (actual time=6.957..17,818.555 rows=3 loops=1)

  • Filter: (cdclasseext = ANY ('{279,280,12121}'::numeric[]))
  • Rows Removed by Filter: 736
2.          

SubPlan (for Index Scan)

3. 2.475 17,817.798 ↑ 1.0 1 3

Aggregate (cost=9,438.92..9,438.93 rows=1 width=8) (actual time=5,939.266..5,939.266 rows=1 loops=3)

4. 9.462 17,815.323 ↓ 141.6 1,699 3

Hash Join (cost=70.54..9,438.89 rows=12 width=14) (actual time=12.122..5,938.441 rows=1,699 loops=3)

  • Hash Cond: (p.cdlocal = (l.cdlocal)::numeric)
5. 5.613 17,805.309 ↓ 154.5 1,699 3

Nested Loop (cost=52.49..9,418.84 rows=11 width=20) (actual time=11.931..5,935.103 rows=1,699 loops=3)

  • Join Filter: ((mv.cdtipomvprocesso)::text = (tpmv.cdtipomvprocesso)::text)
  • Rows Removed by Join Filter: 4846
6. 0.021 1.818 ↑ 200.0 1 3

HashAggregate (cost=12.75..14.75 rows=200 width=32) (actual time=0.603..0.606 rows=1 loops=3)

  • Group Key: (tpmv.cdtipomvprocesso)::text
7. 1.797 1.797 ↑ 1,000.0 1 1

Function Scan on fnarvoremovimentacao tpmv (cost=0.25..10.25 rows=1,000 width=32) (actual time=1.796..1.797 rows=1 loops=1)

8. 10.818 17,797.878 ↓ 297.5 6,545 3

Materialize (cost=39.74..9,338.14 rows=22 width=23) (actual time=7.469..5,932.626 rows=6,545 loops=3)

9. 14.585 17,787.060 ↓ 297.5 6,545 3

Nested Loop (cost=39.74..9,338.03 rows=22 width=23) (actual time=7.465..5,929.020 rows=6,545 loops=3)

10. 121.963 17,579.661 ↓ 7.9 3,781 3

Bitmap Heap Scan on efmpprocesso p (cost=39.18..6,868.38 rows=478 width=20) (actual time=7.441..5,859.887 rows=3,781 loops=3)

  • Recheck Cond: (cdclasseprocesso = c.cdclasse)
  • Filter: (((cdtipoprocesso)::text = ANY ('{0801,0802}'::text[])) AND ((SubPlan 1) <= (SubPlan 2)))
  • Rows Removed by Filter: 20023
  • Heap Blocks: exact=26681
11. 10.758 10.758 ↓ 12.3 23,970 3

Bitmap Index Scan on xif2184efmpprocesso (cost=0.00..39.06 rows=1,952 width=0) (actual time=3.586..3.586 rows=23,970 loops=3)

  • Index Cond: (cdclasseprocesso = c.cdclasse)
12.          

SubPlan (for Bitmap Heap Scan)

13. 2,207.572 2,207.572 ↑ 1.0 1 71,212

Result (cost=0.00..0.26 rows=1 width=4) (actual time=0.031..0.031 rows=1 loops=71,212)

14. 15,239.368 15,239.368 ↑ 1.0 1 71,212

Result (cost=0.00..0.26 rows=1 width=4) (actual time=0.214..0.214 rows=1 loops=71,212)

15. 192.814 192.814 ↓ 2.0 2 11,342

Index Only Scan using xddmfmpprocessomv on efmpprocessomv mv (cost=0.56..5.16 rows=1 width=17) (actual time=0.016..0.017 rows=2 loops=11,342)

  • Index Cond: (cdprocesso = p.cdprocesso)
  • Filter: (date_part('year'::text, dtmovimento) = '2019'::double precision)
  • Rows Removed by Filter: 3
  • Heap Fetches: 0
16. 0.341 0.552 ↑ 1.0 669 1

Hash (cost=9.69..9.69 rows=669 width=4) (actual time=0.552..0.552 rows=669 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 32kB
17. 0.211 0.211 ↑ 1.0 669 1

Seq Scan on esajlocaltemp l (cost=0.00..9.69 rows=669 width=4) (actual time=0.072..0.211 rows=669 loops=1)

Planning time : 2.107 ms
Execution time : 17,818.955 ms