explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Kp3J : Optimization for: plan #1Grl

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.057 192.892 ↑ 1.0 1 1

Aggregate (cost=27,548.17..27,548.18 rows=1 width=0) (actual time=192.892..192.892 rows=1 loops=1)

2. 0.220 192.835 ↑ 1.7 638 1

Hash Join (cost=4,319.09..27,545.43 rows=1,096 width=0) (actual time=190.118..192.835 rows=638 loops=1)

  • Hash Cond: (ppo.dispense_location = fa.facility_id)
3. 167.790 192.599 ↑ 1.7 638 1

Bitmap Heap Scan on mst_om_prescription_patient_order ppo (cost=4,317.46..27,528.73 rows=1,097 width=4) (actual time=190.081..192.599 rows=638 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.809 24.809 ↑ 1.0 218,756 1

Bitmap Index Scan on mst_om_prescription_patient_order_ordering_location_idx (cost=0.00..4,317.18 rows=219,301 width=0) (actual time=24.809..24.809 rows=218,756 loops=1)

  • Index Cond: (ordering_location = 4)
5. 0.010 0.016 ↑ 1.0 28 1

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

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

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

Planning time : 0.443 ms
Execution time : 192.958 ms