explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XFmI : Optimization for: plan #YZFI

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 17.482 623.240 ↓ 0.0 0 1

Gather Merge (cost=70,698.96..70,712.96 rows=120 width=147) (actual time=621.170..623.240 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.045 605.758 ↓ 0.0 0 3 / 3

Sort (cost=69,698.94..69,699.09 rows=60 width=147) (actual time=605.758..605.758 rows=0 loops=3)

  • Sort Key: d.administracion
  • Sort Method: quicksort Memory: 25kB
3. 0.001 605.713 ↓ 0.0 0 3 / 3

Nested Loop Left Join (cost=1.15..69,697.17 rows=60 width=147) (actual time=605.713..605.713 rows=0 loops=3)

4. 0.000 605.712 ↓ 0.0 0 3 / 3

Nested Loop Left Join (cost=0.86..69,482.65 rows=60 width=134) (actual time=605.712..605.712 rows=0 loops=3)

5. 0.001 605.712 ↓ 0.0 0 3 / 3

Nested Loop Left Join (cost=0.57..69,236.25 rows=60 width=116) (actual time=605.712..605.712 rows=0 loops=3)

6. 0.000 605.711 ↓ 0.0 0 3 / 3

Nested Loop Left Join (cost=0.29..69,003.27 rows=60 width=112) (actual time=605.711..605.711 rows=0 loops=3)

7. 605.711 605.711 ↓ 0.0 0 3 / 3

Parallel Seq Scan on dispensaciones_cache d (cost=0.00..68,602.17 rows=60 width=112) (actual time=605.711..605.711 rows=0 loops=3)

  • Filter: ((administracion >= '2018-01-01 00:00:00'::timestamp without time zone) AND (administracion <= '2018-12-31 23:59:59'::timestamp without time zone) AND (id_hospital = 290) AND (id_prescripcion = 26179))
  • Rows Removed by Filter: 585727
8. 0.000 0.000 ↓ 0.0 0 / 3

Index Scan using servicios_pkey on servicios s (cost=0.29..6.69 rows=1 width=8) (never executed)

  • Index Cond: (id = d.id_servicio)
9. 0.000 0.000 ↓ 0.0 0 / 3

Index Scan using secciones_pkey on secciones se (cost=0.29..3.88 rows=1 width=8) (never executed)

  • Index Cond: (id = d.id_seccion)
10. 0.000 0.000 ↓ 0.0 0 / 3

Index Scan using areas_pkey on areas a (cost=0.29..4.11 rows=1 width=26) (never executed)

  • Index Cond: (id = d.id_seccion)
11. 0.000 0.000 ↓ 0.0 0 / 3

Index Scan using medicos_pkey on medicos me (cost=0.29..3.58 rows=1 width=21) (never executed)

  • Index Cond: (id = d.id_medico)
Planning time : 1.625 ms
Execution time : 623.435 ms