explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ihuu

Settings
# exclusive inclusive rows x rows loops node
1. 0.021 21.817 ↑ 1.0 6 1

Nested Loop (cost=2,537.73..143,481.19 rows=6 width=308) (actual time=21.778..21.817 rows=6 loops=1)

  • Buffers: shared hit=708
2. 0.015 21.532 ↑ 4.5 22 1

Nested Loop (cost=2,537.3..142,802.91 rows=99 width=308) (actual time=21.406..21.532 rows=22 loops=1)

  • Buffers: shared hit=620
3. 0.000 14.100 ↑ 1.0 1 1

Append (cost=1,953.34..27,535.15 rows=1 width=154) (actual time=14.1..14.1 rows=1 loops=1)

  • Buffers: shared hit=481
4. 0.042 14.100 ↑ 1.0 1 1

Bitmap Heap Scan on patient patient (cost=1,953.34..27,535.15 rows=1 width=154) (actual time=14.099..14.1 rows=1 loops=1)

  • Filter: ((type = 'Patient'::text) AND (sys_status = 'A'::bpchar))
  • Heap Blocks: exact=3
  • Buffers: shared hit=481
5. 14.058 14.058 ↑ 1,481.7 3 1

Bitmap Index Scan on patient_token_identifier_index (cost=0..1,953.33 rows=4,445 width=0) (actual time=14.058..14.058 rows=3 loops=1)

  • Index Cond: (token((patient.*)::resource, 'identifier'::text) @> '{784199163962865}'::text[])
  • Buffers: shared hit=478
6. 0.141 7.417 ↑ 4.5 22 1

Bitmap Heap Scan on medicationrequest base (cost=583.97..115,266.76 rows=99 width=332) (actual time=7.298..7.417 rows=22 loops=1)

  • Filter: (sys_status = 'A'::bpchar)
  • Heap Blocks: exact=38
  • Buffers: shared hit=139
7. 7.276 7.276 ↑ 379.3 52 1

Bitmap Index Scan on medicationrequest_reference_subject_index (cost=0..583.94 rows=19,725 width=0) (actual time=7.276..7.276 rows=52 loops=1)

  • Index Cond: (reference((base.*)::resource, 'subject'::text) && ARRAY[((patient.type || '/'::text) || patient.id)])
  • Buffers: shared hit=101
8. 0.264 0.264 ↓ 0.0 0 22

Index Scan using medicationrequest_date_authoredon_index_pkey on medicationrequest_date_authoredon_index medicationrequest_date_authoredon_index (cost=0.43..6.85 rows=1 width=8) (actual time=0.012..0.012 rows=0 loops=22)

  • Index Cond: (resource_key = base.key)
  • Filter: ((range && '["2019-11-10 02:00:00+02","2019-11-11 02:00:00+02")'::tstzrange) OR (range >> '["2019-11-10 02:00:00+02","2019-11-11 02:00:00+02")'::tstzrange))
  • Buffers: shared hit=88
Planning time : 35.215 ms
Execution time : 21.943 ms