explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LjSJ

Settings
# exclusive inclusive rows x rows loops node
1. 4.086 506.307 ↑ 1.0 1 1

GroupAggregate (cost=1,691.73..42,443.11 rows=1 width=88) (actual time=506.307..506.307 rows=1 loops=1)

  • Group Key: ('A'::text), ('A'::text)
2. 17.436 502.221 ↓ 1.1 10,164 1

Gather (cost=1,691.73..42,330.87 rows=8,978 width=72) (actual time=24.445..502.221 rows=10,164 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 12.222 484.785 ↑ 1.1 3,388 3 / 3

Nested Loop (cost=691.73..40,433.07 rows=3,741 width=72) (actual time=16.233..484.785 rows=3,388 loops=3)

4. 58.107 61.635 ↑ 1.2 3,669 3 / 3

Bitmap Heap Scan on episodios_cache_nf e (cost=691.3..11,972.13 rows=4,565 width=8) (actual time=16.05..61.635 rows=3,669 loops=3)

  • Filter: ((altad_normalizada >= 20180101) AND (altad_normalizada <= 20181231) AND (id_hospital = 290))
  • Heap Blocks: exact=4378
5. 3.528 3.528 ↓ 1.4 43,863 1 / 3

Bitmap Index Scan on norma_nf (cost=0..688.56 rows=32,019 width=0) (actual time=10.583..10.584 rows=43,863 loops=1)

  • Index Cond: (id_norma = 1)
6. 410.928 410.928 ↑ 6.0 1 11,007 / 3

Index Scan using dispensacion_episodio on dispensaciones_cache dc (cost=0.43..23.42 rows=6 width=4) (actual time=0.112..0.112 rows=1 loops=11,007)

  • Index Cond: (id_episodio = e.id)
  • Filter: ("substring"((atc)::text, 1, 1) = 'A'::text)
Planning time : 1.692 ms
Execution time : 519.464 ms