explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rbNO

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=1.97..2,695.52 rows=100 width=2,192) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.97..253,707.42 rows=9,419 width=2,192) (actual rows= loops=)

  • Join Filter: (application_entities.id = ANY (mr2.application_entity_id))
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.97..243,543.16 rows=5,070 width=1,932) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.68..241,905.00 rows=5,070 width=1,923) (actual rows= loops=)

  • Join Filter: (studies.facility_id = facilities.id)
5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.68..240,811.63 rows=5,070 width=1,749) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.26..227,071.18 rows=5,070 width=1,093) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..219,771.85 rows=5,070 width=169) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..216,806.20 rows=5,264 width=169) (actual rows= loops=)

  • Join Filter: (studies.facility_id = ANY (application_entities.facilities))
9. 0.000 0.000 ↓ 0.0

Index Scan Backward using study_dt_idx on studies (cost=0.42..214,105.60 rows=107,670 width=163) (actual rows= loops=)

  • Filter: ((study_status)::text = ANY ('{CHI,ASAC,TS}'::text[]))
10. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..8.86 rows=1 width=39) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on application_entities (cost=0.00..8.85 rows=1 width=39) (actual rows= loops=)

  • Filter: (((COALESCE(ae_title, 'ae_title_1'::character varying))::text = 'ae_title_1'::text) AND ('MODALITY WORKLIST'::text = ANY ((ae_types)::text[])))
12. 0.000 0.000 ↓ 0.0

Index Only Scan using study_id_idx on study_cpt (cost=0.42..0.55 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (study_id = studies.id)
13. 0.000 0.000 ↓ 0.0

Index Scan using pk_patients on patients (cost=0.42..1.44 rows=1 width=940) (actual rows= loops=)

  • Index Cond: (id = studies.patient_id)
14. 0.000 0.000 ↓ 0.0

Index Scan using pk_orders on orders (cost=0.42..2.71 rows=1 width=676) (actual rows= loops=)

  • Index Cond: (id = studies.order_id)
15. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..5.23 rows=15 width=182) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on facilities (cost=0.00..5.15 rows=15 width=182) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Index Scan using pk_providers on providers (cost=0.28..0.32 rows=1 width=17) (actual rows= loops=)

  • Index Cond: (id = studies.reading_physician_id)
18. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..2.57 rows=38 width=32) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on modality_rooms mr2 (cost=0.00..2.38 rows=38 width=32) (actual rows= loops=)

20.          

SubPlan (forNested Loop Left Join)

21. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)