explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1Grl

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.038 192.116 ↑ 1.0 1 1

Aggregate (cost=27,546.75..27,546.76 rows=1 width=0) (actual time=192.116..192.116 rows=1 loops=1)

2. 0.251 192.078 ↑ 1.7 637 1

Hash Join (cost=4,318.73..27,544.01 rows=1,095 width=0) (actual time=189.386..192.078 rows=637 loops=1)

  • Hash Cond: (ppo.dispense_location = fa.facility_id)
3. 167.230 191.812 ↑ 1.7 637 1

Bitmap Heap Scan on mst_om_prescription_patient_order ppo (cost=4,317.10..27,527.32 rows=1,096 width=4) (actual time=189.357..191.812 rows=637 loops=1)

  • Recheck Cond: (ordering_location = 4)
  • Filter: (date(created_at) = ('now'::cstring)::date)
  • Rows Removed by Filter: 217969
  • Heap Blocks: exact=18225
4. 24.582 24.582 ↑ 1.0 218,754 1

Bitmap Index Scan on mst_om_prescription_patient_order_ordering_location_idx (cost=0.00..4,316.83 rows=219,254 width=0) (actual time=24.582..24.582 rows=218,754 loops=1)

  • Index Cond: (ordering_location = 4)
5. 0.003 0.015 ↑ 1.0 28 1

Hash (cost=1.28..1.28 rows=28 width=4) (actual time=0.015..0.015 rows=28 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
6. 0.012 0.012 ↑ 1.0 28 1

Seq Scan on mst_am_facility fa (cost=0.00..1.28 rows=28 width=4) (actual time=0.002..0.012 rows=28 loops=1)

Planning time : 0.225 ms
Execution time : 192.355 ms