explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UUle

Settings
# exclusive inclusive rows x rows loops node
1. 343.832 26,346.630 ↑ 2.2 357 1

GroupAggregate (cost=330,579.28..330,721.63 rows=768 width=36) (actual time=25,914.564..26,346.63 rows=357 loops=1)

  • Group Key: atc_nivel_4.codigo, atc_nivel_4.codigo
2. 2,604.911 26,002.798 ↓ 43.5 390,479 1

Sort (cost=330,579.28..330,601.73 rows=8,978 width=20) (actual time=25,914.454..26,002.798 rows=390,479 loops=1)

  • Sort Key: atc_nivel_4.codigo
  • Sort Method: external sort Disk: 11,464kB
3. 1,186.869 23,397.887 ↓ 43.5 390,479 1

Nested Loop (cost=313,863.3..329,989.78 rows=8,978 width=20) (actual time=9,809.681..23,397.887 rows=390,479 loops=1)

4. 992.187 13,132.874 ↓ 3,034.1 1,134,768 1

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

5. 706.390 12,140.063 ↓ 6.6 1,163,621 1

Unique (cost=313,837.6..327,015.45 rows=175,705 width=11) (actual time=9,808.997..12,140.063 rows=1,163,621 loops=1)

6. 9,600.501 11,433.673 ↓ 1.0 1,757,182 1

Sort (cost=313,837.6..318,230.22 rows=1,757,046 width=11) (actual time=9,808.995..11,433.673 rows=1,757,182 loops=1)

  • Sort Key: ("substring"((dc.atc)::text, 1, 5)), dc.id_episodio
  • Sort Method: external merge Disk: 48,192kB
7. 1,833.172 1,833.172 ↓ 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.085..1,833.172 rows=1,757,182 loops=1)

8. 0.272 0.624 ↑ 1.0 768 1

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

9. 0.352 0.352 ↑ 1.0 768 1

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

10. 9,078.144 9,078.144 ↓ 0.0 0 1,134,768

Index Scan using id_nf on episodios_cache_nf e (cost=0.42..0.83 rows=1 width=8) (actual time=0.007..0.008 rows=0 loops=1,134,768)

  • Index Cond: (id = dc.id_episodio)
  • Filter: ((altad_normalizada >= 20,180,101) AND (altad_normalizada <= 20,181,231) AND (id_hospital = 290) AND (id_norma = 1))
Planning time : 2.104 ms
Execution time : 26,362.095 ms