explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G2Td

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 199,116.860 ↑ 1.0 1 1

Limit (cost=44,381.07..44,381.14 rows=1 width=506) (actual time=199,116.860..199,116.860 rows=1 loops=1)

2. 0.001 199,116.858 ↑ 1.0 1 1

Unique (cost=44,381.07..44,381.14 rows=1 width=506) (actual time=199,116.858..199,116.858 rows=1 loops=1)

3. 0.050 199,116.857 ↑ 1.0 1 1

Sort (cost=44,381.07..44,381.07 rows=1 width=506) (actual time=199,116.857..199,116.857 rows=1 loops=1)

  • Sort Key: t0.clinical_item_key, t0.activity_time, t0.availability_time, t0.created_on, t0.description, t0.end_time, t0.federated, t0.header, t0.id, t0.label, t0.negat
  • Sort Method: quicksort Memory: 25kB
4. 0.009 199,116.807 ↑ 1.0 1 1

Nested Loop (cost=2.99..44,381.06 rows=1 width=506) (actual time=1.665..199,116.807 rows=1 loops=1)

5. 0.001 199,116.780 ↑ 1.0 1 1

Nested Loop (cost=2.55..44,378.39 rows=1 width=506) (actual time=1.639..199,116.780 rows=1 loops=1)

6. 396.086 199,116.759 ↑ 1.0 1 1

Nested Loop (cost=1.98..44,375.59 rows=1 width=514) (actual time=1.619..199,116.759 rows=1 loops=1)

  • -> Index Only Scan using clinical_item_clinical_msg_pk on clinical_item_clinical_message t4 (cost=0.71..1.84 rows=1 width=17) (actual time=1.735..
7. 198,720.673 198,720.673 ↓ 228.0 228 1

Nested Loop (cost=1.27..44,373.73 rows=1 width=506) (actual time=0.609..198,720.673 rows=228 loops=1)

  • -> Index Scan using clinical_item_subject_key_fki on clinical_item t0 (cost=0.70..44370.94 rows=1 width=450) (actual time=0.577..198689.749
  • Index Cond: (subject_key = '9567513'::numeric)
  • Filter: ((facility_key = '1070'::numeric) AND (source_facility_key = '1085'::numeric) AND (clinical_item_type_key = '16'::numeric))
  • Rows Removed by Filter: 194905
  • -> Index Scan using advance_directive_pk on advance_directive t1 (cost=0.56..2.78 rows=1 width=56) (actual time=0.131..0.132 rows=1 loops=22
  • Index Cond: (clinical_item_key = t0.clinical_item_key)
  • Index Cond: ((clinical_item_key = t1.clinical_item_key) AND (clinical_message_key = '843421831'::numeric))
  • Heap Fetches: 1
8. 0.020 0.020 ↑ 1.0 1 1

Index Only Scan using clinical_message_pk on clinical_message t3 (cost=0.57..2.79 rows=1 width=8) (actual time=0.019..0.020 rows=1 loops=1)

  • Index Cond: (clinical_message_key = '843421831'::numeric)
  • Heap Fetches: 1
9. 0.018 0.018 ↑ 1.0 1 1

Index Scan using coded_element_pk on coded_element t2 (cost=0.44..2.66 rows=1 width=7) (actual time=0.017..0.018 rows=1 loops=1)

  • Index Cond: (coded_element_key = t0.code_key)
  • Filter: ((code)::text = '19000201'::text)
Planning time : 4.313 ms
Execution time : 199,117.135 ms