explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xgum

Settings

Optimization(s) for this plan:

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

Unique (cost=59.16..41,683.84 rows=2 width=80) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=59.16..41,683.84 rows=2 width=80) (actual rows= loops=)

  • Join Filter: ((form.doc #>> '{fields,inputs,contact,_id}'::text[]) = pc.patient_id)
3. 0.000 0.000 ↓ 0.0

Index Scan using useview_postnatal_patient_id on useview_postnatal_care pc (cost=0.42..39,454.90 rows=110,538 width=36) (actual rows= loops=)

  • Filter: ((patient_id <> ''::text) AND (patient_age_in_years >= 12))
4. 0.000 0.000 ↓ 0.0

Materialize (cost=58.74..294.53 rows=1 width=1,626) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash Join (cost=58.74..294.52 rows=1 width=1,626) (actual rows= loops=)

  • Hash Cond: ((form.doc ->> '_id'::text) = dr.uuid)
6. 0.000 0.000 ↓ 0.0

Append (cost=0.42..234.40 rows=653 width=1,582) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using pat_clinic_expr_idx9 on pat_clinic form (cost=0.42..8.44 rows=1 width=1,032) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = 'death_report'::text)
8. 0.000 0.000 ↓ 0.0

Seq Scan on pat_form_death_report form_1 (cost=0.00..155.63 rows=642 width=1,595) (actual rows= loops=)

  • Filter: ((doc ->> 'form'::text) = 'death_report'::text)
9. 0.000 0.000 ↓ 0.0

Seq Scan on pat_district_hospital form_2 (cost=0.00..1.21 rows=1 width=432) (actual rows= loops=)

  • Filter: ((doc ->> 'form'::text) = 'death_report'::text)
10. 0.000 0.000 ↓ 0.0

Index Scan using pat_feedback_expr_idx9 on pat_feedback form_3 (cost=0.29..8.31 rows=1 width=654) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = 'death_report'::text)
11. 0.000 0.000 ↓ 0.0

Index Scan using pat_form_expr_idx9 on pat_form form_4 (cost=0.14..8.16 rows=1 width=638) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = 'death_report'::text)
12. 0.000 0.000 ↓ 0.0

Index Scan using pat_health_center_expr_idx9 on pat_health_center form_5 (cost=0.28..8.30 rows=1 width=957) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = 'death_report'::text)
13. 0.000 0.000 ↓ 0.0

Index Scan using pat_info_expr_idx9 on pat_info form_6 (cost=0.43..8.45 rows=1 width=297) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = 'death_report'::text)
14. 0.000 0.000 ↓ 0.0

Seq Scan on pat_meta form_7 (cost=0.00..1.01 rows=1 width=849) (actual rows= loops=)

  • Filter: ((doc ->> 'form'::text) = 'death_report'::text)
15. 0.000 0.000 ↓ 0.0

Index Scan using pat_person_expr_idx9 on pat_person form_8 (cost=0.42..8.44 rows=1 width=1,401) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = 'death_report'::text)
16. 0.000 0.000 ↓ 0.0

Index Scan using pat_traffic_stats_expr_idx9 on pat_traffic_stats form_9 (cost=0.28..8.29 rows=1 width=828) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = 'death_report'::text)
17. 0.000 0.000 ↓ 0.0

Seq Scan on pat_usage_stats form_10 (cost=0.00..6.60 rows=1 width=1,075) (actual rows= loops=)

  • Filter: ((doc ->> 'form'::text) = 'death_report'::text)
18. 0.000 0.000 ↓ 0.0

Index Scan using couchdb_default_expr_idx9 on couchdb_default form_11 (cost=0.28..8.30 rows=1 width=698) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = 'death_report'::text)
19. 0.000 0.000 ↓ 0.0

Hash (cost=48.88..48.88 rows=755 width=80) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Index Scan using form_metadata_formname on form_metadata dr (cost=0.43..48.88 rows=755 width=80) (actual rows= loops=)

  • Index Cond: (formname = 'death_report'::text)