explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1xLv

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 1.121 ↑ 10.0 1 1

Append (cost=4.59..303.70 rows=10 width=205) (actual time=1.109..1.121 rows=1 loops=1)

2. 0.000 0.007 ↓ 0.0 0 1

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

3. 0.001 0.007 ↓ 0.0 0 1

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

  • Recheck Cond: (complimentee = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid)
4. 0.006 0.006 ↓ 0.0 0 1

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

  • Index Cond: (complimentee = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid)
5. 0.000 0.000 ↓ 0.0 0

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

  • 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.21 rows=4 width=48) (actual time=0.004..0.004 rows=0 loops=1)

  • Recheck Cond: (complimenter = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid)
9. 0.004 0.004 ↓ 0.0 0 1

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

  • Index Cond: (complimenter = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::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 0.011 ↓ 0.0 0 1

GroupAggregate (cost=31.61..31.63 rows=1 width=135) (actual time=0.011..0.011 rows=0 loops=1)

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

Sort (cost=31.61..31.61 rows=1 width=187) (actual time=0.010..0.010 rows=0 loops=1)

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

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

15. 0.000 0.003 ↓ 0.0 0 1

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

16. 0.000 0.003 ↓ 0.0 0 1

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

  • Recheck Cond: (user_id = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid)
17. 0.003 0.003 ↓ 0.0 0 1

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

  • Index Cond: (user_id = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::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.20 rows=1 width=88) (never executed)

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

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

  • Filter: (ahrv.id IS NULL)
  • Rows Removed by Filter: 1
21. 0.002 0.028 ↑ 1.0 1 1

Nested Loop (cost=4.89..45.36 rows=1 width=277) (actual time=0.027..0.028 rows=1 loops=1)

22. 0.001 0.019 ↑ 1.0 1 1

Nested Loop (cost=4.60..40.33 rows=1 width=205) (actual time=0.019..0.019 rows=1 loops=1)

23. 0.004 0.008 ↑ 3.0 1 1

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

  • Recheck Cond: ((user_id IS NOT NULL) AND (user_id = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::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 = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid))
25. 0.010 0.010 ↑ 1.0 1 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.010..0.010 rows=1 loops=1)

  • Index Cond: (id = ahr.ad_hoc_request_group_id)
  • Filter: (expires > now())
26. 0.007 0.007 ↑ 1.0 1 1

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

  • Index Cond: (id = ahg.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
27. 0.023 0.023 ↑ 1.0 1 1

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) (actual time=0.023..0.023 rows=1 loops=1)

  • Index Cond: (ad_hoc_request_id = ahr.id)
28. 0.004 1.035 ↑ 4.0 1 1

Nested Loop (cost=9.19..66.92 rows=4 width=225) (actual time=1.034..1.035 rows=1 loops=1)

29. 0.003 1.027 ↑ 4.0 1 1

Nested Loop Left Join (cost=8.90..64.75 rows=4 width=284) (actual time=1.026..1.027 rows=1 loops=1)

  • Filter: ((ahr_1.user_id IS NULL) = (user_4.id IS NULL))
30. 0.006 1.017 ↑ 8.0 1 1

Nested Loop (cost=8.62..61.46 rows=8 width=212) (actual time=1.016..1.017 rows=1 loops=1)

31. 0.003 1.004 ↑ 3.0 1 1

Bitmap Heap Scan on ad_hoc_request_group ahg_1 (cost=4.31..15.38 rows=3 width=173) (actual time=1.003..1.004 rows=1 loops=1)

  • Recheck Cond: (user_id = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid)
  • Heap Blocks: exact=1
32. 1.001 1.001 ↑ 3.0 1 1

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

  • Index Cond: (user_id = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid)
33. 0.002 0.007 ↑ 3.0 1 1

Bitmap Heap Scan on ad_hoc_request ahr_1 (cost=4.31..15.33 rows=3 width=71) (actual time=0.007..0.007 rows=1 loops=1)

  • Recheck Cond: (ad_hoc_request_group_id = ahg_1.id)
  • Heap Blocks: exact=1
34. 0.005 0.005 ↑ 3.0 1 1

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

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

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

  • Index Cond: (id = ahr_1.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
36. 0.004 0.004 ↑ 1.0 1 1

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.003..0.004 rows=1 loops=1)

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

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

38. 0.000 0.010 ↓ 0.0 0 1

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

39. 0.001 0.010 ↓ 0.0 0 1

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

40. 0.001 0.006 ↑ 3.0 1 1

Nested Loop (cost=4.61..40.25 rows=3 width=48) (actual time=0.006..0.006 rows=1 loops=1)

41. 0.001 0.003 ↑ 3.0 1 1

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

  • Recheck Cond: ((user_id IS NOT NULL) AND (user_id = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid))
  • Heap Blocks: exact=1
42. 0.002 0.002 ↑ 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.002..0.002 rows=1 loops=1)

  • Index Cond: ((user_id IS NOT NULL) AND (user_id = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::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.003 0.003 ↓ 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.003..0.003 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[]))
Planning time : 2.658 ms
Execution time : 1.320 ms