explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RFu1 : Optimization for: plan #rqFTR

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 2.017 740.664 ↑ 1.0 2,183 1

Sort (cost=50,110.06..50,115.51 rows=2,183 width=36) (actual time=740.428..740.664 rows=2,183 loops=1)

  • Sort Key: (sum(dispensaciones))
  • Sort Method: quicksort Memory: 199kB
2. 8.242 738.647 ↑ 1.0 2,183 1

Finalize GroupAggregate (cost=49,918.04..49,988.98 rows=2,183 width=36) (actual time=729.146..738.647 rows=2,183 loops=1)

  • Group Key: id_medicamento
3. 5.366 730.405 ↓ 1.5 6,549 1

Sort (cost=49,918.04..49,928.95 rows=4,366 width=36) (actual time=729.125..730.405 rows=6,549 loops=1)

  • Sort Key: id_medicamento
  • Sort Method: quicksort Memory: 704kB
4. 10.561 725.039 ↓ 1.5 6,549 1

Gather (cost=49,190.18..49,654.07 rows=4,366 width=36) (actual time=713.262..725.039 rows=6,549 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 216.714 714.478 ↑ 1.0 2,183 3 / 3

Partial HashAggregate (cost=48,190.18..48,217.47 rows=2,183 width=36) (actual time=711.705..714.478 rows=2,183 loops=3)

  • Group Key: id_medicamento
6. 497.764 497.764 ↑ 1.2 298,598 3 / 3

Parallel Seq Scan on dispensaciones_cache d (cost=0.00..46,386.66 rows=360,704 width=12) (actual time=132.857..497.764 rows=298,598 loops=3)

  • Filter: ((administraciond_normalizada >= 20,180,101) AND (administraciond_normalizada <= 20,181,231) AND (id_hospital = 290))
  • Rows Removed by Filter: 287,230
Planning time : 0.991 ms
Execution time : 741.110 ms