explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MYGV

Settings
# exclusive inclusive rows x rows loops node
1. 0.053 84.367 ↓ 21.4 343 1

Append (cost=4.59..2,578.10 rows=16 width=172) (actual time=1.384..84.367 rows=343 loops=1)

2. 0.010 1.385 ↑ 2.0 1 1

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

3. 1.313 1.336 ↑ 3.0 1 1

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

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

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

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

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

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

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

7. 0.000 0.940 ↓ 0.0 0 1

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

8. 0.001 0.940 ↓ 0.0 0 1

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

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

Bitmap Index Scan on compliment_complimenter_fk (cost=0.00..4.32 rows=4 width=0) (actual time=0.938..0.939 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.001 1.706 ↓ 0.0 0 1

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

  • Group Key: g.id, gc.seen
13. 0.006 1.705 ↓ 0.0 0 1

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

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

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

15. 0.000 1.698 ↓ 0.0 0 1

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

16. 0.001 1.698 ↓ 0.0 0 1

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

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

Bitmap Index Scan on goal_user_id_fk (cost=0.00..4.30 rows=2 width=0) (actual time=1.697..1.697 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 1.336 ↓ 0.0 0 1

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

  • Filter: (ahrv.id IS NULL)
21. 0.001 1.336 ↓ 0.0 0 1

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

22. 0.001 1.335 ↓ 0.0 0 1

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

23. 0.004 0.853 ↑ 3.0 1 1

Bitmap Heap Scan on ad_hoc_request ahr (cost=4.32..15.35 rows=3 width=56) (actual time=0.852..0.853 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.849 0.849 ↑ 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.849..0.849 rows=1 loops=1)

  • Index Cond: ((user_id IS NOT NULL) AND (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid))
25. 0.481 0.481 ↓ 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.481..0.481 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.355 24.356 ↓ 84.0 336 1

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

29. 0.180 21.649 ↓ 84.0 336 1

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

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

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

31. 0.003 0.020 ↓ 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.019..0.020 rows=6 loops=1)

  • Recheck Cond: (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
  • Heap Blocks: exact=1
32. 0.017 0.017 ↓ 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.017..0.017 rows=6 loops=1)

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

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

  • Recheck Cond: (ad_hoc_request_group_id = ahg_1.id)
  • Heap Blocks: exact=10
34. 6.756 6.756 ↓ 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=1.126..1.126 rows=65 loops=6)

  • Index Cond: (ad_hoc_request_group_id = ahg_1.id)
35. 14.504 14.504 ↑ 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.037..0.037 rows=1 loops=392)

  • Index Cond: (id = ahr_1.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
  • Rows Removed by Filter: 0
36. 2.352 2.352 ↑ 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.007..0.007 rows=1 loops=336)

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

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

38. 0.000 1.058 ↓ 0.0 0 1

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

39. 0.002 1.058 ↓ 0.0 0 1

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

40. 0.003 0.028 ↑ 3.0 1 1

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

41. 0.005 0.009 ↑ 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.008..0.009 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.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))
43. 0.016 0.016 ↑ 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.016..0.016 rows=1 loops=1)

  • Index Cond: (ad_hoc_request_id = ahr_2.id)
44. 1.028 1.028 ↓ 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=1.028..1.028 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 26.506 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.86..1,093.48 rows=1 width=118) (actual time=26.506..26.506 rows=0 loops=1)

  • Filter: (qrv.id IS NULL)
48. 0.001 26.506 ↓ 0.0 0 1

Nested Loop (cost=0.57..1,085.16 rows=1 width=170) (actual time=26.506..26.506 rows=0 loops=1)

49. 0.017 26.505 ↓ 0.0 0 1

Nested Loop (cost=0.29..1,081.19 rows=1 width=98) (actual time=26.505..26.505 rows=0 loops=1)

50. 17.716 17.716 ↓ 2.0 6 1

Seq Scan on questionnaire_request qr (cost=0.00..1,056.22 rows=3 width=56) (actual time=12.557..17.716 rows=6 loops=1)

  • Filter: ((user_id IS NOT NULL) AND (denied IS NULL) AND (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid))
  • Rows Removed by Filter: 46892
51. 8.772 8.772 ↓ 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=1.462..1.462 rows=0 loops=6)

  • Index Cond: (id = qr.questionnaire_request_group_id)
  • Filter: (expires > now())
  • Rows Removed by Filter: 1
52. 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[]))
53. 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)
54. 0.032 13.112 ↓ 1.5 6 1

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

55. 0.015 7.188 ↓ 1.2 6 1

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

  • Filter: ((qr_1.user_id IS NULL) = (user_7.id IS NULL))
56. 0.053 7.113 ↑ 1.5 6 1

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

57. 0.856 2.236 ↓ 1.5 6 1

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

  • Recheck Cond: (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
  • Heap Blocks: exact=1
58. 1.380 1.380 ↓ 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=1.380..1.380 rows=6 loops=1)

  • Index Cond: (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid)
59. 0.042 4.824 ↑ 3.0 1 6

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

  • Recheck Cond: (questionnaire_request_group_id = qg_1.id)
  • Heap Blocks: exact=6
60. 4.782 4.782 ↑ 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.797..0.797 rows=1 loops=6)

  • Index Cond: (questionnaire_request_group_id = qg_1.id)
61. 0.060 0.060 ↑ 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.010..0.010 rows=1 loops=6)

  • Index Cond: (id = qr_1.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
62. 5.892 5.892 ↑ 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.982..0.982 rows=1 loops=6)

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

Nested Loop (cost=1.15..1,090.85 rows=1 width=118) (actual time=13.915..13.915 rows=0 loops=1)

64. 0.001 13.915 ↓ 0.0 0 1

Nested Loop (cost=0.86..1,090.43 rows=1 width=98) (actual time=13.914..13.915 rows=0 loops=1)

65. 0.013 13.914 ↓ 0.0 0 1

Nested Loop (cost=0.57..1,082.13 rows=1 width=64) (actual time=13.914..13.914 rows=0 loops=1)

66. 0.013 9.485 ↓ 2.0 6 1

Nested Loop (cost=0.29..1,081.15 rows=3 width=48) (actual time=3.869..9.485 rows=6 loops=1)

67. 3.502 3.502 ↓ 2.0 6 1

Seq Scan on questionnaire_request qr_2 (cost=0.00..1,056.22 rows=3 width=48) (actual time=2.500..3.502 rows=6 loops=1)

  • Filter: ((user_id IS NOT NULL) AND (user_id = 'c2278e3e-3328-419d-b8c9-9b384fa9529c'::uuid))
  • Rows Removed by Filter: 46892
68. 5.970 5.970 ↑ 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.995..0.995 rows=1 loops=6)

  • Index Cond: (questionnaire_request_id = qr_2.id)
69. 4.416 4.416 ↓ 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.736..0.736 rows=0 loops=6)

  • Index Cond: (questionnaire_review_id = qrv_2.id)
70. 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)
71. 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 : 43.797 ms
Execution time : 86.353 ms