explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XvSw

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 1.156 673.619 ↓ 1.3 2,226 1

Group (cost=95,282.7..95,471 rows=1,766 width=36) (actual time=666.319..673.619 rows=2,226 loops=1)

  • Group Key: e.id, d.atc, d.atc_descripcion
2. 14.455 672.463 ↓ 1.7 2,564 1

Gather Merge (cost=95,282.7..95,459.96 rows=1,472 width=36) (actual time=666.317..672.463 rows=2,564 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.549 658.008 ↓ 1.2 855 3 / 3

Group (cost=94,282.68..94,290.04 rows=736 width=36) (actual time=657.256..658.008 rows=855 loops=3)

  • Group Key: e.id, d.atc, d.atc_descripcion
4. 3.114 657.459 ↓ 1.3 966 3 / 3

Sort (cost=94,282.68..94,284.52 rows=736 width=36) (actual time=657.253..657.459 rows=966 loops=3)

  • Sort Key: e.id, d.atc, d.atc_descripcion
  • Sort Method: quicksort Memory: 101kB
5. 313.864 654.345 ↓ 1.3 966 3 / 3

Hash Join (cost=13,012.43..94,247.63 rows=736 width=36) (actual time=65.854..654.345 rows=966 loops=3)

6. 275.148 275.148 ↑ 1.2 585,727 3 / 3

Seq Scan on dispensaciones_cache d (cost=0..53,772.44 rows=732,144 width=36) (actual time=0.033..275.148 rows=585,727 loops=3)

7. 0.059 65.333 ↓ 1.5 48 3 / 3

Hash (cost=13,012.03..13,012.03 rows=32 width=4) (actual time=65.333..65.333 rows=48 loops=3)

8. 40.138 65.274 ↓ 1.5 48 3 / 3

Bitmap Heap Scan on episodios_cache_nf e (cost=2,458.72..13,012.03 rows=32 width=4) (actual time=32.482..65.274 rows=48 loops=3)

  • Filter: ((grd)::text = '002'::text)
  • Heap Blocks: exact=7796
9. 25.136 25.136 ↓ 1.3 13,619 3 / 3

Bitmap Index Scan on hospital_norma_nf (cost=0..2,458.71 rows=10,644 width=0) (actual time=25.136..25.136 rows=13,619 loops=3)

  • Index Cond: ((id_hospital = 290) AND (altad_normalizada >= 20180101) AND (altad_normalizada <= 20181231) AND (id_norma = 1))
Planning time : 0.942 ms
Execution time : 673.954 ms