explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pi8T

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 0.136 ↑ 1.0 1 1

Nested Loop Left Join (cost=11.52..24.04 rows=1 width=4,336) (actual time=0.124..0.136 rows=1 loops=1)

  • Join Filter: (patient0_.religion_religion_id = religion11_.religion_id)
  • Rows Removed by Join Filter: 11
2. 0.002 0.132 ↑ 1.0 1 1

Nested Loop Left Join (cost=11.52..22.77 rows=1 width=4,314) (actual time=0.121..0.132 rows=1 loops=1)

3. 0.004 0.130 ↑ 1.0 1 1

Nested Loop Left Join (cost=11.24..18.47 rows=1 width=4,147) (actual time=0.120..0.130 rows=1 loops=1)

  • Join Filter: (patient0_.occupation_occupation_id = occupation9_.occupation_id)
  • Rows Removed by Join Filter: 14
4. 0.001 0.125 ↑ 1.0 1 1

Nested Loop Left Join (cost=11.24..17.15 rows=1 width=4,112) (actual time=0.115..0.125 rows=1 loops=1)

  • Join Filter: (patient0_.marital_status_marital_status_id = maritalsta8_.marital_status_id)
  • Rows Removed by Join Filter: 6
5. 0.003 0.122 ↑ 1.0 1 1

Nested Loop Left Join (cost=11.24..16.02 rows=1 width=4,099) (actual time=0.112..0.122 rows=1 loops=1)

  • Join Filter: (patient0_.gender_gender_id = gender7_.gender_id)
  • Rows Removed by Join Filter: 2
6. 0.001 0.118 ↑ 1.0 1 1

Nested Loop Left Join (cost=11.24..14.95 rows=1 width=4,085) (actual time=0.109..0.118 rows=1 loops=1)

7. 0.003 0.116 ↑ 1.0 1 1

Nested Loop Left Join (cost=11.11..14.74 rows=1 width=2,994) (actual time=0.107..0.116 rows=1 loops=1)

8. 0.015 0.107 ↑ 1.0 1 1

Hash Right Join (cost=10.83..12.22 rows=1 width=2,827) (actual time=0.098..0.107 rows=1 loops=1)

  • Hash Cond: (healthfaci1_.facility_id = patient0_.clinic_id)
9. 0.004 0.004 ↑ 1.0 28 1

Seq Scan on mst_am_facility healthfaci1_ (cost=0.00..1.28 rows=28 width=253) (actual time=0.001..0.004 rows=28 loops=1)

10. 0.002 0.088 ↑ 1.0 1 1

Hash (cost=10.82..10.82 rows=1 width=2,574) (actual time=0.088..0.088 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
11. 0.023 0.086 ↑ 1.0 1 1

Hash Right Join (cost=6.83..10.82 rows=1 width=2,574) (actual time=0.083..0.086 rows=1 loops=1)

  • Hash Cond: (ethnicsubg5_.sub_ethnic_group_id = patient0_.ethnic_sub_group_sub_ethnic_group_id)
12. 0.013 0.013 ↑ 1.0 144 1

Seq Scan on ref_co_sub_ethnic_group ethnicsubg5_ (cost=0.00..3.44 rows=144 width=1,091) (actual time=0.002..0.013 rows=144 loops=1)

13. 0.001 0.050 ↑ 1.0 1 1

Hash (cost=6.82..6.82 rows=1 width=1,483) (actual time=0.050..0.050 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
14. 0.014 0.049 ↑ 1.0 1 1

Hash Right Join (cost=5.63..6.82 rows=1 width=1,483) (actual time=0.046..0.049 rows=1 loops=1)

  • Hash Cond: (ethnicgrou4_.ethnic_group_id = patient0_.ethnic_group_ethnic_group_id)
15. 0.001 0.001 ↑ 1.0 13 1

Seq Scan on ref_co_ethnic_group ethnicgrou4_ (cost=0.00..1.13 rows=13 width=1,091) (actual time=0.000..0.001 rows=13 loops=1)

16. 0.002 0.034 ↑ 1.0 1 1

Hash (cost=5.61..5.61 rows=1 width=392) (actual time=0.034..0.034 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
17. 0.010 0.032 ↑ 1.0 1 1

Hash Right Join (cost=4.45..5.61 rows=1 width=392) (actual time=0.030..0.032 rows=1 loops=1)

  • Hash Cond: (educationl3_.education_level_id = patient0_.education_level_education_level_id)
18. 0.002 0.002 ↑ 1.0 11 1

Seq Scan on ref_co_education_level educationl3_ (cost=0.00..1.11 rows=11 width=18) (actual time=0.001..0.002 rows=11 loops=1)

19. 0.003 0.020 ↑ 1.0 1 1

Hash (cost=4.44..4.44 rows=1 width=374) (actual time=0.020..0.020 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
20. 0.017 0.017 ↑ 1.0 1 1

Index Scan using mst_pm_patient_patient_id_idx on mst_pm_patient patient0_ (cost=0.42..4.44 rows=1 width=374) (actual time=0.015..0.017 rows=1 loops=1)

  • Index Cond: (patient_id = 1000000192506::bigint)
21. 0.006 0.006 ↑ 1.0 1 1

Index Scan using ref_am_simple_list_config_pkey on ref_am_simple_list_config simplelist2_ (cost=0.28..2.51 rows=1 width=167) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (healthfaci1_.facility_type_id = simple_list_config_id)
22. 0.001 0.001 ↓ 0.0 0 1

Index Scan using ref_co_ethnic_group_pkey on ref_co_ethnic_group ethnicgrou6_ (cost=0.14..0.19 rows=1 width=1,091) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (ethnicsubg5_.ethnic_group_id = ethnic_group_id)
23. 0.001 0.001 ↑ 1.0 3 1

Seq Scan on ref_co_gender gender7_ (cost=0.00..1.03 rows=3 width=14) (actual time=0.001..0.001 rows=3 loops=1)

24. 0.002 0.002 ↑ 1.0 6 1

Seq Scan on ref_co_marital_status maritalsta8_ (cost=0.00..1.06 rows=6 width=13) (actual time=0.001..0.002 rows=6 loops=1)

25. 0.001 0.001 ↑ 1.0 14 1

Seq Scan on ref_co_occupation occupation9_ (cost=0.00..1.14 rows=14 width=35) (actual time=0.000..0.001 rows=14 loops=1)

26. 0.000 0.000 ↓ 0.0 0 1

Index Scan using ref_am_simple_list_config_pkey on ref_am_simple_list_config simplelist10_ (cost=0.28..4.29 rows=1 width=167) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (patient0_.profile_id = simple_list_config_id)
27. 0.001 0.001 ↑ 1.0 12 1

Seq Scan on ref_co_religion religion11_ (cost=0.00..1.12 rows=12 width=22) (actual time=0.001..0.001 rows=12 loops=1)