explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bMbV

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 46.303 ↑ 18.0 1 1

Hash Join (cost=43.53..2,424.67 rows=18 width=14) (actual time=34.596..46.303 rows=1 loops=1)

  • Output: conjunto.cdprocesso
  • Inner Unique: true
  • Hash Cond: (((conjunto.cdtipomvprocesso)::character varying)::text = (tpmv.cdtipomvprocesso)::text)
  • Buffers: shared hit=1356
2. 1.257 45.479 ↑ 8.8 4 1

Hash Join (cost=26.29..2,407.08 rows=35 width=18) (actual time=33.768..45.479 rows=4 loops=1)

  • Output: conjunto.cdprocesso, conjunto.cdtipomvprocesso
  • Inner Unique: true
  • Hash Cond: ((conjunto.cdassuntoprinc)::numeric = a.cdassunto)
  • Buffers: shared hit=1334
3. 4.429 39.296 ↓ 14.2 994 1

Hash Semi Join (cost=9.04..2,389.21 rows=70 width=22) (actual time=14.060..39.296 rows=994 loops=1)

  • Output: conjunto.cdprocesso, conjunto.cdtipomvprocesso, conjunto.cdassuntoprinc
  • Hash Cond: ((conjunto.cdlocal)::numeric = (((unnest('{23029}'::text[])))::numeric))
  • Buffers: shared hit=1252
4. 8.393 34.844 ↓ 15.2 2,131 1

Hash Semi Join (cost=4.52..2,383.45 rows=140 width=26) (actual time=13.897..34.844 rows=2,131 loops=1)

  • Output: conjunto.cdprocesso, conjunto.cdlocal, conjunto.cdtipomvprocesso, conjunto.cdassuntoprinc
  • Hash Cond: ((conjunto.cdtipoprocesso)::numeric = (((unnest('{0801,0802}'::text[])))::numeric))
  • Buffers: shared hit=1252
5. 26.422 26.422 ↓ 14.3 4,027 1

Seq Scan on saj.efmpconjunto conjunto (cost=0.00..2,376.44 rows=281 width=30) (actual time=6.400..26.422 rows=4,027 loops=1)

  • Output: conjunto.conjuntoid, conjunto.cdclasseprocesso, conjunto.cdassuntoprinc, conjunto.cdassuntoext, conjunto.cdtipolocal, conjunto.detipolocal, conjunto.cdlocal, conjunto.delocal, conjunto.cdprocesso, conjunto.nuprocesso, conjunto.cdtipomvprocesso, conjunto.nuseqprocessomv, conjunto.dtmovimento, conjunto.cdtipoprocesso, conjunto.cdtipomvext
  • Filter: (((conjunto.dtmovimento)::date >= '2020-01-01'::date) AND ((conjunto.dtmovimento)::date <= '2020-12-31'::date))
  • Rows Removed by Filter: 52195
  • Buffers: shared hit=1252
6. 0.007 0.029 ↑ 50.0 2 1

Hash (cost=3.27..3.27 rows=100 width=32) (actual time=0.028..0.029 rows=2 loops=1)

  • Output: (((unnest('{0801,0802}'::text[])))::numeric)
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.009 0.022 ↑ 50.0 2 1

Result (cost=0.00..2.27 rows=100 width=32) (actual time=0.012..0.022 rows=2 loops=1)

  • Output: ((unnest('{0801,0802}'::text[])))::numeric
8. 0.010 0.013 ↑ 50.0 2 1

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual time=0.007..0.013 rows=2 loops=1)

  • Output: unnest('{0801,0802}'::text[])
9. 0.003 0.003 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.003 rows=1 loops=1)

10. 0.004 0.023 ↑ 100.0 1 1

Hash (cost=3.27..3.27 rows=100 width=32) (actual time=0.023..0.023 rows=1 loops=1)

  • Output: (((unnest('{23029}'::text[])))::numeric)
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.007 0.019 ↑ 100.0 1 1

Result (cost=0.00..2.27 rows=100 width=32) (actual time=0.012..0.019 rows=1 loops=1)

  • Output: ((unnest('{23029}'::text[])))::numeric
12. 0.009 0.012 ↑ 100.0 1 1

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual time=0.007..0.012 rows=1 loops=1)

  • Output: unnest('{23029}'::text[])
13. 0.003 0.003 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.003 rows=1 loops=1)

14. 0.005 4.926 ↑ 200.0 1 1

Hash (cost=14.75..14.75 rows=200 width=32) (actual time=4.925..4.926 rows=1 loops=1)

  • Output: a.cdassunto
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=82
15. 0.013 4.921 ↑ 200.0 1 1

HashAggregate (cost=12.75..14.75 rows=200 width=32) (actual time=4.918..4.921 rows=1 loops=1)

  • Output: a.cdassunto
  • Group Key: a.cdassunto
  • Buffers: shared hit=82
16. 4.908 4.908 ↑ 1,000.0 1 1

Function Scan on saj.fnarvoreassunto a (cost=0.25..10.25 rows=1,000 width=32) (actual time=4.906..4.908 rows=1 loops=1)

  • Output: a.cdassunto
  • Function Call: fnarvoreassunto('12218'::character varying)
  • Buffers: shared hit=82
17. 0.006 0.800 ↑ 200.0 1 1

Hash (cost=14.75..14.75 rows=200 width=32) (actual time=0.799..0.800 rows=1 loops=1)

  • Output: tpmv.cdtipomvprocesso
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=22
18. 0.013 0.794 ↑ 200.0 1 1

HashAggregate (cost=12.75..14.75 rows=200 width=32) (actual time=0.791..0.794 rows=1 loops=1)

  • Output: tpmv.cdtipomvprocesso
  • Group Key: (tpmv.cdtipomvprocesso)::text
  • Buffers: shared hit=22
19. 0.781 0.781 ↑ 1,000.0 1 1

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

  • Output: tpmv.cdtipomvprocesso, (tpmv.cdtipomvprocesso)::text
  • Function Call: fnarvoremovimentacao('920246'::character varying)
  • Buffers: shared hit=22
Planning time : 0.774 ms
Execution time : 46.568 ms