explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eixU : Optimization for: plan #5MJD

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 11.469 54.724 ↓ 28.4 30,599 1

Gather (cost=20,441.35..448,828.34 rows=1,079 width=8) (actual time=7.889..54.724 rows=30,599 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
2. 1.355 43.255 ↓ 24.1 15,300 2 / 2

Nested Loop (cost=19,441.35..447,720.44 rows=635 width=8) (actual time=4.921..43.255 rows=15,300 loops=2)

3. 2.258 15.471 ↑ 1.2 1,391 2 / 2

Merge Join (cost=19,353.85..55,904.52 rows=1,636 width=16) (actual time=4.875..15.471 rows=1,391 loops=2)

  • Merge Cond: (lote_recurso.id = historico_tentativa_envio_recurso_old.lote_recurso_id)
4. 11.322 11.322 ↑ 1.2 22,072 2 / 2

Parallel Index Only Scan using id_lote_recurso_pkey on lote_recurso (cost=58.00..37,673.24 rows=26,216 width=8) (actual time=0.041..11.322 rows=22,072 loops=2)

  • Heap Fetches: 44145
5. 1.891 1.891 ↑ 1.0 2,746 2 / 2

Index Only Scan using idx_historico_tentativa_envio_recurso_old_lote_recurso_id_idx on historico_tentativa_envio_recurso_old (cost=56.00..2,925.00 rows=2,782 width=8) (actual time=0.038..1.891 rows=2,746 loops=2)

  • Heap Fetches: 5491
6. 26.429 26.429 ↓ 11.0 11 2,782 / 2

Index Scan using idx_fiboguia_id_lote_recurso on fiboguia (cost=87.50..239.00 rows=1 width=16) (actual time=0.005..0.019 rows=11 loops=2,782)

  • Index Cond: (id_lote_recurso = lote_recurso.id)
  • Filter: ((guiorigem = 'HOSPITAL'::text) AND (discriminador = 'RECURSO'::text))
Planning time : 1.727 ms
Execution time : 56.250 ms