explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5MJD

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 80,084.769 206,857.161 ↓ 28.8 30,599 1

Gather (cost=15,073.70..34,839.75 rows=1,064 width=8) (actual time=138.656..206,857.161 rows=30,599 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 7.872 126,772.392 ↓ 23.0 6,120 5 / 5

Merge Join (cost=14,073.70..33,733.35 rows=266 width=8) (actual time=117.762..126,772.392 rows=6,120 loops=5)

  • Merge Cond: (fiboguia.id_lote_recurso = historico_tentativa_envio_recurso_old.lote_recurso_id)
3. 20.259 126,761.431 ↓ 17.0 73,069 5 / 5

Merge Join (cost=150.15..744,763.68 rows=4,308 width=24) (actual time=0.623..126,761.431 rows=73,069 loops=5)

  • Merge Cond: (fiboguia.id_lote_recurso = lote_recurso.id)
4. 126,711.763 126,711.763 ↑ 1.5 73,069 5 / 5

Parallel Index Scan using idx_fiboguia_id_lote_recurso on fiboguia (cost=87.50..17,096,119.38 rows=109,646 width=16) (actual time=0.037..126,711.763 rows=73,069 loops=5)

  • Filter: ((guiorigem = 'HOSPITAL'::text) AND (discriminador = 'RECURSO'::text))
  • Rows Removed by Filter: 1399
5. 29.409 29.409 ↑ 1.0 43,610 5 / 5

Index Only Scan using id_lote_recurso_pkey on lote_recurso (cost=58.00..46,849.00 rows=44,568 width=8) (actual time=0.052..29.409 rows=43,610 loops=5)

  • Heap Fetches: 218050
6. 3.089 3.089 ↓ 3.0 8,246 5 / 5

Index Only Scan using idx_historico_tentativa_envio_recurso_lote_recurso_id_idx on historico_tentativa_envio_recurso_old (cost=56.00..2,896.50 rows=2,752 width=8) (actual time=0.054..3.089 rows=8,246 loops=5)

  • Heap Fetches: 41232
Planning time : 1.438 ms
Execution time : 206,858.898 ms