explain.depesz.com

PostgreSQL's explain analyze made readable

Result: b8e

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.102 ↑ 2.0 5 1

Limit (cost=82.45..82.48 rows=10 width=1,173) (actual time=0.101..0.102 rows=5 loops=1)

2. 0.015 0.100 ↑ 4.6 5 1

Sort (cost=82.45..82.51 rows=23 width=1,173) (actual time=0.100..0.100 rows=5 loops=1)

  • Sort Key: visitencou0_.encounter_start
  • Sort Method: quicksort Memory: 28kB
3. 0.002 0.085 ↑ 4.6 5 1

Nested Loop (cost=1.28..81.95 rows=23 width=1,173) (actual time=0.035..0.085 rows=5 loops=1)

4. 0.003 0.033 ↑ 2.2 5 1

Nested Loop (cost=0.85..25.21 rows=11 width=8) (actual time=0.024..0.033 rows=5 loops=1)

5. 0.014 0.014 ↑ 1.0 1 1

Index Only Scan using mst_pm_patient_patient_id_idx on mst_pm_patient patient2_ (cost=0.42..2.44 rows=1 width=8) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: (patient_id = 1000000192506::bigint)
  • Heap Fetches: 0
6. 0.016 0.016 ↑ 2.2 5 1

Index Scan using trx_pm_patient_visit_patient_id_idx on trx_pm_patient_visit patientvis1_ (cost=0.43..22.66 rows=11 width=16) (actual time=0.009..0.016 rows=5 loops=1)

  • Index Cond: (patient_id = 1000000192506::bigint)
7. 0.050 0.050 ↑ 4.0 1 5

Index Scan using trx_pm_visit_encounter_visit_id_idx on trx_pm_visit_encounter visitencou0_ (cost=0.43..5.12 rows=4 width=1,173) (actual time=0.008..0.010 rows=1 loops=5)

  • Index Cond: (visit_id = patientvis1_.visit_id)
  • Filter: (document_type <> ALL ('{2,4}'::integer[]))
  • Rows Removed by Filter: 1