explain.depesz.com

PostgreSQL's explain analyze made readable

Result: atZy : Optimization for: Optimization for: plan #rbZX; plan #gs33

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.015 19.668 ↑ 1.0 1 1

Aggregate (cost=3,206.30..3,206.31 rows=1 width=8) (actual time=19.667..19.668 rows=1 loops=1)

2. 0.003 19.653 ↓ 4.0 4 1

Nested Loop (cost=1,086.67..3,206.30 rows=1 width=8) (actual time=19.620..19.653 rows=4 loops=1)

3. 0.003 19.593 ↑ 1.0 1 1

Nested Loop (cost=1,086.25..3,201.72 rows=1 width=8) (actual time=19.571..19.593 rows=1 loops=1)

4. 0.037 0.037 ↑ 1.0 1 1

Seq Scan on mst_am_facility healthfaci2_ (cost=0.00..1.42 rows=1 width=4) (actual time=0.025..0.037 rows=1 loops=1)

  • Filter: (upper((facility_name)::text) = 'KK SEREMBAN'::text)
  • Rows Removed by Filter: 27
5. 7.087 19.553 ↑ 1.0 1 1

Bitmap Heap Scan on mst_om_prescription_patient_order prescripti0_ (cost=1,086.25..3,200.29 rows=1 width=12) (actual time=19.544..19.553 rows=1 loops=1)

  • Recheck Cond: ((ordering_location = healthfaci2_.facility_id) AND ((approval_status)::text = 'For Approval'::text))
  • Filter: ((created_date >= '2019-04-09 00:00:00'::timestamp without time zone) AND (created_date <= '2019-04-11 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 4671
  • Heap Blocks: exact=3392
6. 12.466 12.466 ↓ 3.8 4,672 1

Bitmap Index Scan on mst_om_prescription_patient_order_ordering_location_idx (cost=0.00..1,086.24 rows=1,238 width=0) (actual time=12.466..12.466 rows=4,672 loops=1)

  • Index Cond: ((ordering_location = healthfaci2_.facility_id) AND ((approval_status)::text = 'For Approval'::text))
7. 0.057 0.057 ↑ 1.2 4 1

Index Only Scan using mst_om_prescription_order_patient_order_id_idx on mst_om_prescription_order listprescr1_ (cost=0.43..4.53 rows=5 width=8) (actual time=0.047..0.057 rows=4 loops=1)

  • Index Cond: (patient_order_id = prescripti0_.patient_order_id)
  • Heap Fetches: 4
Planning time : 0.544 ms
Execution time : 19.725 ms