explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qyML

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 14,889.286 ↑ 1.0 3 1

Sort (cost=5,807.58..5,807.58 rows=3 width=41) (actual time=14,889.286..14,889.286 rows=3 loops=1)

  • Sort Key: c.declasse
  • Sort Method: quicksort Memory: 25kB
2. 0.035 14,889.266 ↑ 1.0 3 1

Bitmap Heap Scan on esajclasse c (cost=12.85..5,807.55 rows=3 width=41) (actual time=32.161..14,889.266 rows=3 loops=1)

  • Recheck Cond: (cdclasse = ANY ('{680,260,259}'::numeric[]))
  • Heap Blocks: exact=3
3. 0.033 0.033 ↑ 1.0 3 1

Bitmap Index Scan on xpkesajclasse (cost=0.00..12.85 rows=3 width=0) (actual time=0.033..0.033 rows=3 loops=1)

  • Index Cond: (cdclasse = ANY ('{680,260,259}'::numeric[]))
4.          

SubPlan (for Bitmap Heap Scan)

5. 10.995 14,889.198 ↑ 1.0 1 3

Aggregate (cost=1,928.53..1,928.54 rows=1 width=8) (actual time=4,963.066..4,963.066 rows=1 loops=3)

6. 9,467.532 14,878.203 ↓ 29,619.0 29,619 3

Nested Loop (cost=370.27..1,928.52 rows=1 width=14) (actual time=26.899..4,959.401 rows=29,619 loops=3)

  • Join Filter: (p.cdlocal = (l.cdlocal)::numeric)
  • Rows Removed by Join Filter: 19785492
7. 9.348 1,234.392 ↓ 29,619.0 29,619 3

Nested Loop (cost=370.27..1,908.80 rows=1 width=20) (actual time=26.792..411.464 rows=29,619 loops=3)

8. 0.012 0.012 ↑ 1.0 1 3

Seq Scan on arvoremovimentacao arv (cost=0.00..1.01 rows=1 width=32) (actual time=0.003..0.004 rows=1 loops=3)

9. 10.305 1,225.032 ↓ 4,936.5 29,619 3

Nested Loop (cost=370.27..1,907.73 rows=6 width=23) (actual time=26.785..408.344 rows=29,619 loops=3)

10. 0.009 0.009 ↑ 1.0 2 3

Seq Scan on tipoprocesso tp (cost=0.00..1.02 rows=2 width=32) (actual time=0.002..0.003 rows=2 loops=3)

11. 55.360 1,214.718 ↓ 221.0 14,810 6

Nested Loop (cost=370.27..952.68 rows=67 width=28) (actual time=17.489..202.453 rows=14,810 loops=6)

12. 62.310 162.390 ↓ 177.1 11,869 6

Bitmap Heap Scan on efmpprocesso p (cost=369.71..627.23 rows=67 width=25) (actual time=17.378..27.065 rows=11,869 loops=6)

  • Recheck Cond: ((cdclasseprocesso = c.cdclasse) AND ((cdtipoprocesso)::text = tp.cdtipoprocesso))
  • Heap Blocks: exact=26691
13. 2.418 100.080 ↓ 0.0 0 6

BitmapAnd (cost=369.71..369.71 rows=67 width=0) (actual time=16.680..16.680 rows=0 loops=6)

14. 17.640 17.640 ↓ 12.3 23,970 6

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

  • Index Cond: (cdclasseprocesso = c.cdclasse)
15. 80.022 80.022 ↓ 10.7 198,184 6

Bitmap Index Scan on xif2182efmpprocesso (cost=0.00..329.90 rows=18,596 width=0) (actual time=13.337..13.337 rows=198,184 loops=6)

  • Index Cond: ((cdtipoprocesso)::text = tp.cdtipoprocesso)
16. 996.968 996.968 ↑ 1.0 1 71,212

Index Only Scan using xddmfmpprocessomv on efmpprocessomv mv (cost=0.56..4.85 rows=1 width=17) (actual time=0.014..0.014 rows=1 loops=71,212)

  • Index Cond: ((cdprocesso = p.cdprocesso) AND (cdtipomvprocesso = (arv.cdtipomvprocesso)::text))
  • Filter: (((dtmovimento)::date >= '2019-01-01'::date) AND ((dtmovimento)::date <= '2019-12-31'::date))
  • Rows Removed by Filter: 0
  • Heap Fetches: 0
17. 4,176.279 4,176.279 ↑ 1.0 669 88,857

Seq Scan on esajlocaltemp l (cost=0.00..9.69 rows=669 width=4) (actual time=0.003..0.047 rows=669 loops=88,857)

Planning time : 2.017 ms
Execution time : 14,889.958 ms