explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eIHS

Settings
# exclusive inclusive rows x rows loops node
1. 0.673 13,503.220 ↓ 19.0 171 1

GroupAggregate (cost=329,708.84..329,709.06 rows=9 width=36) (actual time=13,502.521..13,503.22 rows=171 loops=1)

  • Group Key: atc_nivel_4.codigo, atc_nivel_4.codigo
2. 1.920 13,502.547 ↓ 57.3 516 1

Sort (cost=329,708.84..329,708.86 rows=9 width=20) (actual time=13,502.483..13,502.547 rows=516 loops=1)

  • Sort Key: atc_nivel_4.codigo
  • Sort Method: quicksort Memory: 65kB
3. 289.473 13,500.627 ↓ 57.3 516 1

Hash Join (cost=313,889.19..329,708.69 rows=9 width=20) (actual time=10,103.473..13,500.627 rows=516 loops=1)

4. 868.559 13,209.717 ↓ 3,034.1 1,134,768 1

Hash Join (cost=313,862.88..329,676.3 rows=374 width=10) (actual time=10,093.839..13,209.717 rows=1,134,768 loops=1)

5. 665.624 12,340.776 ↓ 6.6 1,163,621 1

Unique (cost=313,837.6..327,015.45 rows=175,705 width=11) (actual time=10,093.444..12,340.776 rows=1,163,621 loops=1)

6. 9,876.962 11,675.152 ↓ 1.0 1,757,182 1

Sort (cost=313,837.6..318,230.22 rows=1,757,046 width=11) (actual time=10,093.442..11,675.152 rows=1,757,182 loops=1)

  • Sort Key: ("substring"((dc.atc)::text, 1, 5)), dc.id_episodio
  • Sort Method: external merge Disk: 48192kB
7. 1,798.190 1,798.190 ↓ 1.0 1,757,182 1

Seq Scan on dispensaciones_cache dc (cost=0..71,530.46 rows=1,757,046 width=11) (actual time=0.025..1,798.19 rows=1,757,182 loops=1)

8. 0.204 0.382 ↑ 1.0 768 1

Hash (cost=15.68..15.68 rows=768 width=6) (actual time=0.382..0.382 rows=768 loops=1)

9. 0.178 0.178 ↑ 1.0 768 1

Seq Scan on atc_nivel_4 atc_nivel_4 (cost=0..15.68 rows=768 width=6) (actual time=0.009..0.178 rows=768 loops=1)

10. 0.008 1.437 ↓ 1.3 14 1

Hash (cost=26.17..26.17 rows=11 width=8) (actual time=1.437..1.437 rows=14 loops=1)

11. 1.429 1.429 ↓ 1.3 14 1

Index Scan using hospital_norma_nf on episodios_cache_nf e (cost=0.42..26.17 rows=11 width=8) (actual time=1.407..1.429 rows=14 loops=1)

  • Index Cond: ((id_hospital = 290) AND (altad_normalizada = 20180101) AND (id_norma = 1))
Planning time : 1.552 ms
Execution time : 13,513.885 ms