explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8W9c

Settings
# exclusive inclusive rows x rows loops node
1. 42.283 1,544.641 ↓ 913.3 11,873 1

Sort (cost=136,804.98..136,805.01 rows=13 width=355) (actual time=1,537.900..1,544.641 rows=11,873 loops=1)

  • Sort Key: base.id
  • Sort Method: external merge Disk: 6056kB
2. 24.527 1,502.358 ↓ 913.3 11,873 1

Nested Loop Left Join (cost=58,701.30..136,804.74 rows=13 width=355) (actual time=809.227..1,502.358 rows=11,873 loops=1)

3. 5.936 1,454.085 ↓ 913.3 11,873 1

Nested Loop Left Join (cost=58,701.02..136,797.95 rows=13 width=348) (actual time=809.207..1,454.085 rows=11,873 loops=1)

4. 5.277 1,412.530 ↓ 913.3 11,873 1

Nested Loop Left Join (cost=58,700.59..136,781.63 rows=13 width=340) (actual time=809.201..1,412.530 rows=11,873 loops=1)

5. 10.086 1,371.634 ↓ 913.3 11,873 1

Hash Join (cost=58,700.17..136,765.31 rows=13 width=332) (actual time=809.157..1,371.634 rows=11,873 loops=1)

  • Hash Cond: (facetoface.course = course.id)
6. 3.483 1,359.639 ↓ 1.3 12,431 1

Nested Loop Left Join (cost=58,606.48..136,635.80 rows=9,523 width=285) (actual time=807.243..1,359.639 rows=12,431 loops=1)

  • Index Cond: ((userid = auser.id) AND (fieldid = 35))
7. 4.923 1,318.863 ↓ 1.3 12,431 1

Nested Loop Left Join (cost=58,606.06..124,682.53 rows=9,523 width=277) (actual time=807.238..1,318.863 rows=12,431 loops=1)

8. 6.901 1,276.647 ↓ 1.3 12,431 1

Nested Loop Left Join (cost=58,605.63..112,729.25 rows=9,523 width=269) (actual time=807.232..1,276.647 rows=12,431 loops=1)

9. 9.444 1,232.453 ↓ 1.3 12,431 1

Hash Join (cost=58,605.21..100,775.98 rows=9,523 width=261) (actual time=807.226..1,232.453 rows=12,431 loops=1)

  • Hash Cond: (sessions.facetoface = facetoface.id)
10. 10.249 1,222.634 ↓ 1.3 12,431 1

Nested Loop Left Join (cost=58,537.39..100,577.22 rows=9,523 width=222) (actual time=806.836..1,222.634 rows=12,431 loops=1)

11. 12.588 1,175.092 ↓ 1.3 12,431 1

Nested Loop Left Join (cost=58,536.97..88,623.95 rows=9,523 width=214) (actual time=806.829..1,175.092 rows=12,431 loops=1)

12. 25.768 1,100.349 ↓ 1.3 12,431 1

Hash Join (cost=58,536.55..76,670.68 rows=9,523 width=206) (actual time=806.807..1,100.349 rows=12,431 loops=1)

  • Hash Cond: (sessions.id = sessiondate.sessionid)
13. 56.999 1,069.262 ↓ 1.2 118,542 1

Hash Join (cost=58,040.83..75,212.84 rows=99,073 width=186) (actual time=742.824..1,069.262 rows=118,542 loops=1)

  • Hash Cond: (base.sessionid = sessions.id)
14. 108.592 998.731 ↓ 1.2 118,542 1

Hash Left Join (cost=56,605.62..72,415.37 rows=99,073 width=138) (actual time=729.259..998.731 rows=118,542 loops=1)

  • Hash Cond: (base.userid = auser.id)
15. 101.198 650.714 ↓ 1.2 118,542 1

Hash Join (cost=28,695.98..41,071.48 rows=99,073 width=40) (actual time=489.602..650.714 rows=118,542 loops=1)

  • Hash Cond: (status.signupid = base.id)
16. 61.024 61.024 ↓ 1.2 118,542 1

Seq Scan on mdl_facetoface_signups_status status (cost=0.00..9,073.25 rows=99,073 width=16) (actual time=0.025..61.024 rows=118,542 loops=1)

  • Filter: ((superceded = 0) AND ((statuscode = 100) OR (statuscode = 90) OR (statuscode = 80) OR (statuscode = 70)))
  • Rows Removed by Filter: 166358
17. 38.106 488.492 ↑ 1.0 142,133 1

Hash (cost=25,947.31..25,947.31 rows=142,133 width=32) (actual time=488.492..488.492 rows=142,133 loops=1)

  • Buckets: 65536 Batches: 4 Memory Usage: 2741kB
18. 43.258 450.386 ↑ 1.0 142,133 1

Merge Left Join (cost=17,725.95..25,947.31 rows=142,133 width=32) (actual time=331.737..450.386 rows=142,133 loops=1)

  • Merge Cond: (base.sessionid = attendees.sessionid)
19. 62.899 62.899 ↑ 1.0 142,133 1

Index Scan using mdl_facesign_ses_ix on mdl_facetoface_signups base (cost=0.42..5,734.45 rows=142,133 width=24) (actual time=0.014..62.899 rows=142,133 loops=1)

20. 18.210 344.229 ↓ 11.8 141,406 1

Sort (cost=17,725.53..17,755.61 rows=12,031 width=16) (actual time=331.718..344.229 rows=141,406 loops=1)

  • Sort Key: attendees.sessionid
  • Sort Method: quicksort Memory: 1560kB
21. 1.738 326.019 ↓ 1.4 16,894 1

Subquery Scan on attendees (cost=16,669.54..16,910.16 rows=12,031 width=16) (actual time=318.350..326.019 rows=16,894 loops=1)

22. 46.483 324.281 ↓ 1.4 16,894 1

HashAggregate (cost=16,669.54..16,789.85 rows=12,031 width=16) (actual time=318.349..324.281 rows=16,894 loops=1)

  • Group Key: su.sessionid
23. 101.256 277.798 ↑ 1.1 118,587 1

Hash Join (cost=5,358.99..16,024.46 rows=129,016 width=16) (actual time=84.256..277.798 rows=118,587 loops=1)

  • Hash Cond: (ss.signupid = su.id)
24. 92.876 92.876 ↑ 1.1 118,587 1

Seq Scan on mdl_facetoface_signups_status ss (cost=0.00..6,936.50 rows=129,016 width=16) (actual time=0.020..92.876 rows=118,587 loops=1)

  • Filter: ((statuscode >= 50) AND (superceded = 0))
  • Rows Removed by Filter: 166313
25. 50.336 83.666 ↑ 1.0 142,133 1

Hash (cost=2,887.33..2,887.33 rows=142,133 width=16) (actual time=83.666..83.666 rows=142,133 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 2689kB
26. 33.330 33.330 ↑ 1.0 142,133 1

Seq Scan on mdl_facetoface_signups su (cost=0.00..2,887.33 rows=142,133 width=16) (actual time=0.005..33.330 rows=142,133 loops=1)

27. 14.301 239.425 ↑ 1.0 31,381 1

Hash (cost=26,995.09..26,995.09 rows=31,404 width=106) (actual time=239.425..239.425 rows=31,381 loops=1)

  • Buckets: 32768 Batches: 2 Memory Usage: 2576kB
28. 21.355 225.124 ↑ 1.0 31,381 1

Hash Right Join (cost=15,183.52..26,995.09 rows=31,404 width=106) (actual time=140.974..225.124 rows=31,381 loops=1)

  • Hash Cond: (auser_cf_21.userid = auser.id)
29. 62.990 62.990 ↓ 1.0 21,214 1

Seq Scan on mdl_user_info_data auser_cf_21 (cost=0.00..10,821.65 rows=21,158 width=16) (actual time=0.040..62.990 rows=21,214 loops=1)

  • Filter: (fieldid = 21)
  • Rows Removed by Filter: 501638
30. 14.639 140.779 ↑ 1.0 31,381 1

Hash (cost=14,299.97..14,299.97 rows=31,404 width=98) (actual time=140.779..140.779 rows=31,381 loops=1)

  • Buckets: 32768 Batches: 2 Memory Usage: 2451kB
31. 23.456 126.140 ↑ 1.0 31,381 1

Hash Right Join (cost=2,521.59..14,299.97 rows=31,404 width=98) (actual time=34.793..126.140 rows=31,381 loops=1)

  • Hash Cond: (auser_cf_20.userid = auser.id)
32. 68.052 68.052 ↓ 1.0 21,199 1

Seq Scan on mdl_user_info_data auser_cf_20 (cost=0.00..10,821.65 rows=21,071 width=16) (actual time=0.012..68.052 rows=21,199 loops=1)

  • Filter: (fieldid = 20)
  • Rows Removed by Filter: 501653
33. 15.117 34.632 ↑ 1.0 31,381 1

Hash (cost=1,668.04..1,668.04 rows=31,404 width=90) (actual time=34.632..34.632 rows=31,381 loops=1)

  • Buckets: 32768 Batches: 2 Memory Usage: 2268kB
34. 19.515 19.515 ↑ 1.0 31,381 1

Seq Scan on mdl_user auser (cost=0.00..1,668.04 rows=31,404 width=90) (actual time=0.013..19.515 rows=31,381 loops=1)

35. 5.796 13.532 ↑ 1.0 18,612 1

Hash (cost=1,202.57..1,202.57 rows=18,612 width=48) (actual time=13.532..13.532 rows=18,612 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1274kB
36. 3.667 7.736 ↑ 1.0 18,612 1

Nested Loop (cost=0.00..1,202.57 rows=18,612 width=48) (actual time=0.018..7.736 rows=18,612 loops=1)

37. 0.015 0.015 ↑ 1.0 1 1

Seq Scan on mdl_user_info_field auser_cf_20_fielddefault (cost=0.00..1.32 rows=1 width=32) (actual time=0.009..0.015 rows=1 loops=1)

  • Filter: (id = 20)
  • Rows Removed by Filter: 25
38. 4.054 4.054 ↑ 1.0 18,612 1

Seq Scan on mdl_facetoface_sessions sessions (cost=0.00..1,015.12 rows=18,612 width=16) (actual time=0.002..4.054 rows=18,612 loops=1)

39. 0.691 5.319 ↓ 1.0 1,797 1

Hash (cost=473.35..473.35 rows=1,789 width=44) (actual time=5.319..5.319 rows=1,797 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 147kB
40. 4.628 4.628 ↓ 1.0 1,797 1

Seq Scan on mdl_facetoface_sessions_dates sessiondate (cost=0.00..473.35 rows=1,789 width=44) (actual time=0.221..4.628 rows=1,797 loops=1)

  • Filter: ((timestart <> 0) AND (timestart >= 1549324800))
  • Rows Removed by Filter: 16960
41. 62.155 62.155 ↑ 1.0 1 12,431

Index Scan using mdl_userinfodata_usefie_uix on mdl_user_info_data auser_cf_34 (cost=0.42..1.25 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=12,431)

  • Index Cond: ((userid = auser.id) AND (fieldid = 34))
42. 37.293 37.293 ↑ 1.0 1 12,431

Index Scan using mdl_userinfodata_usefie_uix on mdl_user_info_data auser_cf_19 (cost=0.42..1.25 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=12,431)

  • Index Cond: ((userid = auser.id) AND (fieldid = 19))
43. 0.160 0.375 ↑ 1.0 703 1

Hash (cost=59.03..59.03 rows=703 width=55) (actual time=0.375..0.375 rows=703 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 71kB
44. 0.215 0.215 ↑ 1.0 703 1

Seq Scan on mdl_facetoface facetoface (cost=0.00..59.03 rows=703 width=55) (actual time=0.004..0.215 rows=703 loops=1)

45. 37.293 37.293 ↑ 1.0 1 12,431

Index Scan using mdl_userinfodata_usefie_uix on mdl_user_info_data auser_cf_35 (cost=0.42..1.25 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=12,431)

46. 37.293 37.293 ↑ 1.0 1 12,431

Index Scan using mdl_userinfodata_usefie_uix on mdl_user_info_data auser_cf_18 (cost=0.42..1.25 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=12,431)

  • Index Cond: ((userid = auser.id) AND (fieldid = 18))
47. 37.293 37.293 ↑ 1.0 1 12,431

Index Scan using mdl_userinfodata_usefie_uix on mdl_user_info_data auser_cf_22 (cost=0.42..1.25 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=12,431)

  • Index Cond: ((userid = auser.id) AND (fieldid = 22))
48. 0.099 1.909 ↓ 353.0 353 1

Hash (cost=93.68..93.68 rows=1 width=63) (actual time=1.909..1.909 rows=353 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 44kB
49. 0.059 1.810 ↓ 353.0 353 1

Nested Loop (cost=4.83..93.68 rows=1 width=63) (actual time=0.088..1.810 rows=353 loops=1)

50. 0.141 0.339 ↓ 11.0 353 1

Nested Loop (cost=4.54..38.13 rows=32 width=47) (actual time=0.080..0.339 rows=353 loops=1)

51. 0.016 0.016 ↑ 1.0 1 1

Seq Scan on mdl_course_categories course_category (cost=0.00..1.35 rows=1 width=8) (actual time=0.011..0.016 rows=1 loops=1)

  • Filter: ((path)::text = '/90'::text)
  • Rows Removed by Filter: 27
52. 0.122 0.182 ↓ 10.4 353 1

Bitmap Heap Scan on mdl_course course (cost=4.54..36.44 rows=34 width=55) (actual time=0.066..0.182 rows=353 loops=1)

  • Recheck Cond: (category = course_category.id)
  • Heap Blocks: exact=20
53. 0.060 0.060 ↓ 10.4 353 1

Bitmap Index Scan on wa_course (cost=0.00..4.53 rows=34 width=0) (actual time=0.060..0.060 rows=353 loops=1)

  • Index Cond: (category = course_category.id)
54. 1.412 1.412 ↑ 1.0 1 353

Index Scan using mdl_cont_ins_ix on mdl_context ctx (cost=0.29..1.73 rows=1 width=16) (actual time=0.003..0.004 rows=1 loops=353)

  • Index Cond: (instanceid = course.id)
  • Filter: (contextlevel = 50)
  • Rows Removed by Filter: 2
55. 35.619 35.619 ↑ 1.0 1 11,873

Index Scan using mdl_userinfodata_usefie_uix on mdl_user_info_data auser_cf_29 (cost=0.42..1.25 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=11,873)

  • Index Cond: ((userid = auser.id) AND (fieldid = 29))
56. 35.619 35.619 ↑ 1.0 1 11,873

Index Scan using mdl_userinfodata_usefie_uix on mdl_user_info_data auser_cf_30 (cost=0.42..1.25 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=11,873)

  • Index Cond: ((userid = auser.id) AND (fieldid = 30))
57. 23.746 23.746 ↑ 1.0 1 11,873

Index Scan using mdl_faceroom_id_pk on mdl_facetoface_room room (cost=0.28..0.49 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=11,873)

  • Index Cond: (sessiondate.roomid = id)