explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YLqp

Settings
# exclusive inclusive rows x rows loops node
1. 159.382 10,833.759 ↓ 911.7 41,025 1

Nested Loop (cost=1,277.50..55,928.00 rows=45 width=776) (actual time=21.911..10,833.759 rows=41,025 loops=1)

  • Join Filter: (pd.user_account_uid = ua.uid)
2. 40.836 10,387.202 ↓ 911.7 41,025 1

Nested Loop (cost=1,277.21..55,538.65 rows=45 width=760) (actual time=21.886..10,387.202 rows=41,025 loops=1)

3. 101.223 10,223.291 ↓ 122.8 41,025 1

Nested Loop (cost=1,276.94..55,436.74 rows=334 width=723) (actual time=21.878..10,223.291 rows=41,025 loops=1)

4. 54.185 89.032 ↑ 1.0 41,119 1

Hash Join (cost=1,268.18..4,167.77 rows=41,119 width=663) (actual time=21.785..89.032 rows=41,119 loops=1)

  • Hash Cond: (ci.uid = papu.patient_contact_info_uid)
5. 13.334 13.334 ↑ 1.0 55,136 1

Seq Scan on contact_info ci (cost=0.00..1,661.36 rows=55,136 width=646) (actual time=0.014..13.334 rows=55,136 loops=1)

6. 13.418 21.513 ↑ 1.0 41,119 1

Hash (cost=754.19..754.19 rows=41,119 width=33) (actual time=21.513..21.513 rows=41,119 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 3,123kB
7. 8.095 8.095 ↑ 1.0 41,119 1

Seq Scan on patient_attributes_per_user papu (cost=0.00..754.19 rows=41,119 width=33) (actual time=0.008..8.095 rows=41,119 loops=1)

8. 2,343.783 10,033.036 ↑ 1.0 1 41,119

Hash Join (cost=8.76..10.00 rows=1 width=60) (actual time=0.134..0.244 rows=1 loops=41,119)

  • Hash Cond: (sapu.screening_uid = s.uid)
9. 7,278.063 7,278.063 ↓ 6.2 343 41,119

Index Scan using screening_access_right_user_account_uid_screening_is_archiv_idx on screening_attributes_per_user sapu (cost=0.41..1.44 rows=55 width=35) (actual time=0.008..0.177 rows=343 loops=41,119)

  • Index Cond: (user_account_uid = papu.user_account_uid)
  • Filter: has_access_right
10. 41.119 411.190 ↑ 1.0 1 41,119

Hash (cost=8.33..8.33 rows=1 width=57) (actual time=0.010..0.010 rows=1 loops=41,119)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
11. 41.119 370.071 ↑ 1.0 1 41,119

Subquery Scan on s (cost=8.32..8.33 rows=1 width=57) (actual time=0.009..0.009 rows=1 loops=41,119)

12. 41.119 328.952 ↑ 1.0 1 41,119

Limit (cost=8.32..8.32 rows=1 width=65) (actual time=0.008..0.008 rows=1 loops=41,119)

13. 82.238 287.833 ↑ 1.0 1 41,119

Sort (cost=8.32..8.32 rows=1 width=65) (actual time=0.007..0.007 rows=1 loops=41,119)

  • Sort Key: s_1.creation DESC
  • Sort Method: quicksort Memory: 25kB
14. 205.595 205.595 ↑ 1.0 1 41,119

Index Scan using screening_patient_contact_info_uid_idx1 on screening s_1 (cost=0.29..8.31 rows=1 width=65) (actual time=0.004..0.005 rows=1 loops=41,119)

  • Index Cond: (patient_contact_info_uid = ci.uid)
15. 123.075 123.075 ↑ 1.0 1 41,025

Index Scan using practice_details_user_account_uid_idx on practice_details pd (cost=0.28..0.30 rows=1 width=37) (actual time=0.003..0.003 rows=1 loops=41,025)

  • Index Cond: (user_account_uid = sapu.user_account_uid)
16. 123.075 123.075 ↑ 1.0 1 41,025

Index Scan using user_account_pkey on user_account ua (cost=0.28..0.33 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=41,025)

  • Index Cond: (uid = sapu.user_account_uid)
17.          

SubPlan (for Nested Loop)

18. 164.100 164.100 ↑ 1.0 1 41,025

Index Scan using patient_tag_patient_contact_info_uid_idx on patient_tag pt (cost=0.29..8.31 rows=1 width=5) (actual time=0.004..0.004 rows=1 loops=41,025)

  • Index Cond: (patient_contact_info_uid = ci.uid)
  • Filter: (doctor_uid = pd.user_account_uid)
  • Rows Removed by Filter: 0
Planning time : 5.173 ms
Execution time : 10,837.204 ms