explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Hktx

Settings
# exclusive inclusive rows x rows loops node
1. 0.047 4.535 ↓ 21.4 343 1

Append (cost=4.59..496.93 rows=16 width=172) (actual time=0.023..4.535 rows=343 loops=1)

2. 0.006 0.023 ↑ 2.0 1 1

Nested Loop (cost=4.59..40.51 rows=2 width=206) (actual time=0.022..0.023 rows=1 loops=1)

3. 0.004 0.011 ↑ 3.0 1 1

Bitmap Heap Scan on compliment c (cost=4.31..15.60 rows=3 width=186) (actual time=0.010..0.011 rows=1 loops=1)

  • Recheck Cond: (complimentee = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
  • Heap Blocks: exact=1
4. 0.007 0.007 ↑ 3.0 1 1

Bitmap Index Scan on compliment_complimentee_fk (cost=0.00..4.31 rows=3 width=0) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (complimentee = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
5. 0.006 0.006 ↑ 1.0 1 1

Index Scan using user_pkey on "user" (cost=0.29..8.30 rows=1 width=88) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (id = c.complimenter)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
6. 0.000 0.004 ↓ 0.0 0 1

Nested Loop (cost=4.88..60.72 rows=1 width=154) (actual time=0.004..0.004 rows=0 loops=1)

7. 0.000 0.004 ↓ 0.0 0 1

Nested Loop (cost=4.60..52.41 rows=1 width=134) (actual time=0.004..0.004 rows=0 loops=1)

8. 0.000 0.004 ↓ 0.0 0 1

Bitmap Heap Scan on compliment c_1 (cost=4.32..19.22 rows=4 width=48) (actual time=0.004..0.004 rows=0 loops=1)

  • Recheck Cond: (complimenter = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
9. 0.004 0.004 ↓ 0.0 0 1

Bitmap Index Scan on compliment_complimenter_fk (cost=0.00..4.32 rows=4 width=0) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (complimenter = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using compliment_reaction_pkey on compliment_reaction cr (cost=0.28..8.30 rows=1 width=102) (never executed)

  • Index Cond: (compliment_id = c_1.id)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using user_pkey on "user" user_1 (cost=0.29..8.30 rows=1 width=88) (never executed)

  • Index Cond: (id = c_1.complimentee)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
12. 0.000 0.009 ↓ 0.0 0 1

GroupAggregate (cost=31.70..31.73 rows=1 width=135) (actual time=0.009..0.009 rows=0 loops=1)

  • Group Key: g.id, gc.seen
13. 0.005 0.009 ↓ 0.0 0 1

Sort (cost=31.70..31.71 rows=1 width=187) (actual time=0.009..0.009 rows=0 loops=1)

  • Sort Key: g.id, gc.seen
  • Sort Method: quicksort Memory: 25kB
14. 0.000 0.004 ↓ 0.0 0 1

Nested Loop (cost=4.86..31.69 rows=1 width=187) (actual time=0.004..0.004 rows=0 loops=1)

15. 0.000 0.004 ↓ 0.0 0 1

Nested Loop (cost=4.58..28.40 rows=1 width=115) (actual time=0.004..0.004 rows=0 loops=1)

16. 0.000 0.004 ↓ 0.0 0 1

Bitmap Heap Scan on goal g (cost=4.30..11.80 rows=2 width=83) (actual time=0.004..0.004 rows=0 loops=1)

  • Recheck Cond: (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
17. 0.004 0.004 ↓ 0.0 0 1

Bitmap Index Scan on goal_user_id_fk (cost=0.00..4.30 rows=2 width=0) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
18. 0.000 0.000 ↓ 0.0 0

Index Scan using goal_comment_goal_id_fk on goal_comment gc (cost=0.28..8.29 rows=1 width=48) (never executed)

  • Index Cond: (goal_id = g.id)
19. 0.000 0.000 ↓ 0.0 0

Index Scan using user_pkey on "user" user_2 (cost=0.29..3.29 rows=1 width=88) (never executed)

  • Index Cond: (id = gc.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
20. 0.000 0.024 ↓ 0.0 0 1

Nested Loop Left Join (cost=5.18..54.51 rows=1 width=225) (actual time=0.024..0.024 rows=0 loops=1)

  • Filter: (ahrv.id IS NULL)
21. 0.000 0.024 ↓ 0.0 0 1

Nested Loop (cost=4.89..46.20 rows=1 width=277) (actual time=0.024..0.024 rows=0 loops=1)

22. 0.003 0.024 ↓ 0.0 0 1

Nested Loop (cost=4.60..40.37 rows=1 width=205) (actual time=0.024..0.024 rows=0 loops=1)

23. 0.006 0.010 ↑ 3.0 1 1

Bitmap Heap Scan on ad_hoc_request ahr (cost=4.32..15.35 rows=3 width=56) (actual time=0.010..0.010 rows=1 loops=1)

  • Recheck Cond: ((user_id IS NOT NULL) AND (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid))
  • Filter: (denied IS NULL)
  • Heap Blocks: exact=1
24. 0.004 0.004 ↑ 3.0 1 1

Bitmap Index Scan on ad_hoc_request_user_id_fk (cost=0.00..4.32 rows=3 width=0) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: ((user_id IS NOT NULL) AND (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid))
25. 0.011 0.011 ↓ 0.0 0 1

Index Scan using ad_hoc_request_group_pkey on ad_hoc_request_group ahg (cost=0.29..8.31 rows=1 width=181) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: (id = ahr.ad_hoc_request_group_id)
  • Filter: (expires > now())
  • Rows Removed by Filter: 1
26. 0.000 0.000 ↓ 0.0 0

Index Scan using user_pkey on "user" user_3 (cost=0.29..5.83 rows=1 width=88) (never executed)

  • Index Cond: (id = ahg.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
27. 0.000 0.000 ↓ 0.0 0

Index Scan using ad_hoc_review_ad_hoc_request_id_key on ad_hoc_review ahrv (cost=0.29..8.30 rows=1 width=32) (never executed)

  • Index Cond: (ad_hoc_request_id = ahr.id)
28. 0.136 3.206 ↓ 84.0 336 1

Nested Loop (cost=9.19..66.96 rows=4 width=225) (actual time=1.029..3.206 rows=336 loops=1)

29. 0.300 1.726 ↓ 84.0 336 1

Nested Loop Left Join (cost=8.90..64.81 rows=4 width=284) (actual time=0.535..1.726 rows=336 loops=1)

  • Filter: ((ahr_1.user_id IS NULL) = (user_4.id IS NULL))
  • Rows Removed by Filter: 56
30. 0.098 0.250 ↓ 49.0 392 1

Nested Loop (cost=8.62..61.52 rows=8 width=212) (actual time=0.039..0.250 rows=392 loops=1)

31. 0.013 0.026 ↓ 2.0 6 1

Bitmap Heap Scan on ad_hoc_request_group ahg_1 (cost=4.31..15.40 rows=3 width=173) (actual time=0.025..0.026 rows=6 loops=1)

  • Recheck Cond: (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
  • Heap Blocks: exact=1
32. 0.013 0.013 ↓ 2.0 6 1

Bitmap Index Scan on ad_hoc_request_group_user_id_fk (cost=0.00..4.31 rows=3 width=0) (actual time=0.013..0.013 rows=6 loops=1)

  • Index Cond: (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
33. 0.072 0.126 ↓ 21.7 65 6

Bitmap Heap Scan on ad_hoc_request ahr_1 (cost=4.31..15.35 rows=3 width=71) (actual time=0.012..0.021 rows=65 loops=6)

  • Recheck Cond: (ad_hoc_request_group_id = ahg_1.id)
  • Heap Blocks: exact=10
34. 0.054 0.054 ↓ 21.7 65 6

Bitmap Index Scan on ad_hoc_request_group_id_email_uk (cost=0.00..4.31 rows=3 width=0) (actual time=0.009..0.009 rows=65 loops=6)

  • Index Cond: (ad_hoc_request_group_id = ahg_1.id)
35. 1.176 1.176 ↑ 1.0 1 392

Index Scan using user_pkey on "user" user_4 (cost=0.29..0.40 rows=1 width=88) (actual time=0.003..0.003 rows=1 loops=392)

  • Index Cond: (id = ahr_1.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
  • Rows Removed by Filter: 0
36. 1.344 1.344 ↑ 1.0 1 336

Index Scan using ad_hoc_review_ad_hoc_request_id_key on ad_hoc_review ahrv_1 (cost=0.29..0.54 rows=1 width=48) (actual time=0.004..0.004 rows=1 loops=336)

  • Index Cond: (ad_hoc_request_id = ahr_1.id)
37. 0.001 0.015 ↓ 0.0 0 1

Nested Loop (cost=5.46..50.11 rows=1 width=225) (actual time=0.015..0.015 rows=0 loops=1)

38. 0.000 0.014 ↓ 0.0 0 1

Nested Loop (cost=5.17..49.56 rows=1 width=205) (actual time=0.014..0.014 rows=0 loops=1)

39. 0.001 0.014 ↓ 0.0 0 1

Nested Loop (cost=4.89..41.26 rows=1 width=64) (actual time=0.014..0.014 rows=0 loops=1)

40. 0.003 0.009 ↑ 3.0 1 1

Nested Loop (cost=4.61..40.27 rows=3 width=48) (actual time=0.008..0.009 rows=1 loops=1)

41. 0.001 0.004 ↑ 3.0 1 1

Bitmap Heap Scan on ad_hoc_request ahr_2 (cost=4.32..15.35 rows=3 width=48) (actual time=0.004..0.004 rows=1 loops=1)

  • Recheck Cond: ((user_id IS NOT NULL) AND (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid))
  • Heap Blocks: exact=1
42. 0.003 0.003 ↑ 3.0 1 1

Bitmap Index Scan on ad_hoc_request_user_id_fk (cost=0.00..4.32 rows=3 width=0) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: ((user_id IS NOT NULL) AND (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid))
43. 0.002 0.002 ↑ 1.0 1 1

Index Scan using ad_hoc_review_ad_hoc_request_id_key on ad_hoc_review ahrv_2 (cost=0.29..8.30 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=1)

  • Index Cond: (ad_hoc_request_id = ahr_2.id)
44. 0.004 0.004 ↓ 0.0 0 1

Index Scan using ad_hoc_review_reaction_pkey on ad_hoc_review_reaction ahrvr (cost=0.28..0.33 rows=1 width=32) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (ad_hoc_review_id = ahrv_2.id)
45. 0.000 0.000 ↓ 0.0 0

Index Scan using ad_hoc_request_group_pkey on ad_hoc_request_group ahg_2 (cost=0.29..8.30 rows=1 width=173) (never executed)

  • Index Cond: (id = ahr_2.ad_hoc_request_group_id)
46. 0.000 0.000 ↓ 0.0 0

Index Scan using user_pkey on "user" user_5 (cost=0.29..0.55 rows=1 width=88) (never executed)

  • Index Cond: (id = ahg_2.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
47. 0.000 1.071 ↓ 0.0 0 1

Nested Loop Left Join (cost=5.18..52.89 rows=1 width=118) (actual time=1.071..1.071 rows=0 loops=1)

  • Filter: (qrv.id IS NULL)
48. 0.000 1.071 ↓ 0.0 0 1

Nested Loop (cost=4.89..44.57 rows=1 width=170) (actual time=1.071..1.071 rows=0 loops=1)

49. 0.003 1.071 ↓ 0.0 0 1

Nested Loop (cost=4.61..40.61 rows=1 width=98) (actual time=1.071..1.071 rows=0 loops=1)

50. 0.010 1.044 ↓ 2.0 6 1

Bitmap Heap Scan on questionnaire_request qr (cost=4.32..15.64 rows=3 width=56) (actual time=1.038..1.044 rows=6 loops=1)

  • Recheck Cond: ((user_id IS NOT NULL) AND (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid))
  • Filter: (denied IS NULL)
  • Heap Blocks: exact=6
51. 1.034 1.034 ↓ 2.0 6 1

Bitmap Index Scan on questionnaire_request_user_id_fk (cost=0.00..4.32 rows=3 width=0) (actual time=1.034..1.034 rows=6 loops=1)

  • Index Cond: ((user_id IS NOT NULL) AND (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid))
52. 0.024 0.024 ↓ 0.0 0 6

Index Scan using questionnaire_request_group_pkey on questionnaire_request_group qg (cost=0.29..8.31 rows=1 width=74) (actual time=0.004..0.004 rows=0 loops=6)

  • Index Cond: (id = qr.questionnaire_request_group_id)
  • Filter: (expires > now())
  • Rows Removed by Filter: 1
53. 0.000 0.000 ↓ 0.0 0

Index Scan using user_pkey on "user" user_6 (cost=0.29..3.97 rows=1 width=88) (never executed)

  • Index Cond: (id = qg.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
54. 0.000 0.000 ↓ 0.0 0

Index Scan using questionnaire_review_questionnaire_request_id_key on questionnaire_review qrv (cost=0.29..8.31 rows=1 width=32) (never executed)

  • Index Cond: (questionnaire_request_id = qr.id)
55. 0.011 0.091 ↓ 1.5 6 1

Nested Loop (cost=9.33..88.98 rows=4 width=118) (actual time=0.030..0.091 rows=6 loops=1)

56. 0.006 0.062 ↓ 1.2 6 1

Nested Loop Left Join (cost=9.04..85.51 rows=5 width=178) (actual time=0.022..0.062 rows=6 loops=1)

  • Filter: ((qr_1.user_id IS NULL) = (user_7.id IS NULL))
57. 0.014 0.044 ↑ 1.5 6 1

Nested Loop (cost=8.76..82.20 rows=9 width=106) (actual time=0.016..0.044 rows=6 loops=1)

58. 0.003 0.006 ↓ 1.5 6 1

Bitmap Heap Scan on questionnaire_request_group qg_1 (cost=4.32..19.05 rows=4 width=66) (actual time=0.005..0.006 rows=6 loops=1)

  • Recheck Cond: (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
  • Heap Blocks: exact=1
59. 0.003 0.003 ↓ 1.5 6 1

Bitmap Index Scan on questionnaire_request_group_user_id_fk (cost=0.00..4.32 rows=4 width=0) (actual time=0.003..0.003 rows=6 loops=1)

  • Index Cond: (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
60. 0.006 0.024 ↑ 3.0 1 6

Bitmap Heap Scan on questionnaire_request qr_1 (cost=4.44..15.76 rows=3 width=72) (actual time=0.004..0.004 rows=1 loops=6)

  • Recheck Cond: (questionnaire_request_group_id = qg_1.id)
  • Heap Blocks: exact=6
61. 0.018 0.018 ↑ 3.0 1 6

Bitmap Index Scan on questionnaire_request_group_id_email_uk (cost=0.00..4.44 rows=3 width=0) (actual time=0.003..0.003 rows=1 loops=6)

  • Index Cond: (questionnaire_request_group_id = qg_1.id)
62. 0.012 0.012 ↑ 1.0 1 6

Index Scan using user_pkey on "user" user_7 (cost=0.29..0.36 rows=1 width=88) (actual time=0.002..0.002 rows=1 loops=6)

  • Index Cond: (id = qr_1.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
63. 0.018 0.018 ↑ 1.0 1 6

Index Scan using questionnaire_review_questionnaire_request_id_key on questionnaire_review qrv_1 (cost=0.29..0.69 rows=1 width=48) (actual time=0.003..0.003 rows=1 loops=6)

  • Index Cond: (questionnaire_request_id = qr_1.id)
64. 0.000 0.045 ↓ 0.0 0 1

Nested Loop (cost=5.47..50.27 rows=1 width=118) (actual time=0.045..0.045 rows=0 loops=1)

65. 0.000 0.045 ↓ 0.0 0 1

Nested Loop (cost=5.18..49.85 rows=1 width=98) (actual time=0.045..0.045 rows=0 loops=1)

66. 0.004 0.045 ↓ 0.0 0 1

Nested Loop (cost=4.90..41.54 rows=1 width=64) (actual time=0.045..0.045 rows=0 loops=1)

67. 0.002 0.029 ↓ 2.0 6 1

Nested Loop (cost=4.61..40.56 rows=3 width=48) (actual time=0.010..0.029 rows=6 loops=1)

68. 0.005 0.009 ↓ 2.0 6 1

Bitmap Heap Scan on questionnaire_request qr_2 (cost=4.32..15.64 rows=3 width=48) (actual time=0.005..0.009 rows=6 loops=1)

  • Recheck Cond: ((user_id IS NOT NULL) AND (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid))
  • Heap Blocks: exact=6
69. 0.004 0.004 ↓ 2.0 6 1

Bitmap Index Scan on questionnaire_request_user_id_fk (cost=0.00..4.32 rows=3 width=0) (actual time=0.004..0.004 rows=6 loops=1)

  • Index Cond: ((user_id IS NOT NULL) AND (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid))
70. 0.018 0.018 ↑ 1.0 1 6

Index Scan using questionnaire_review_questionnaire_request_id_key on questionnaire_review qrv_2 (cost=0.29..8.31 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=6)

  • Index Cond: (questionnaire_request_id = qr_2.id)
71. 0.012 0.012 ↓ 0.0 0 6

Index Scan using questionnaire_review_reaction_pkey on questionnaire_review_reaction qrvr (cost=0.29..0.33 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=6)

  • Index Cond: (questionnaire_review_id = qrv_2.id)
72. 0.000 0.000 ↓ 0.0 0

Index Scan using questionnaire_request_group_pkey on questionnaire_request_group qg_2 (cost=0.29..8.30 rows=1 width=66) (never executed)

  • Index Cond: (id = qr_2.questionnaire_request_group_id)
73. 0.000 0.000 ↓ 0.0 0

Index Scan using user_pkey on "user" user_8 (cost=0.29..0.42 rows=1 width=88) (never executed)

  • Index Cond: (id = qg_2.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
Planning time : 20.397 ms
Execution time : 9.633 ms