explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wrQ5

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

Append (cost=4.59..668.78 rows=10 width=205) (actual time=1.474..1.488 rows=1 loops=1)

2. 0.000 0.009 ↓ 0.0 0 1

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

3. 0.001 0.009 ↓ 0.0 0 1

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

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

Bitmap Index Scan on complimentee_fk (cost=0.00..4.31 rows=3 width=0) (actual time=0.008..0.008 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.400 ↓ 0.0 0 1

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

  • Group Key: g.id, gc.seen
13. 0.004 0.399 ↓ 0.0 0 1

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

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

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

15. 0.001 0.395 ↓ 0.0 0 1

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

16. 0.000 0.394 ↓ 0.0 0 1

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

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

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

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

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

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

22. 0.003 0.024 ↑ 1.0 1 1

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

23. 0.005 0.010 ↑ 3.0 1 1

Bitmap Heap Scan on ad_hoc_request ahr (cost=4.32..15.34 rows=3 width=56) (actual time=0.009..0.010 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.005 0.005 ↑ 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.005..0.005 rows=1 loops=1)

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

  • Index Cond: (id = ahr.ad_hoc_request_group_id)
  • Filter: (expires > now())
26. 0.010 0.010 ↑ 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.010..0.010 rows=1 loops=1)

  • Index Cond: (id = ahg.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
27. 0.008 0.008 ↑ 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.008..0.008 rows=1 loops=1)

  • Index Cond: (ad_hoc_request_id = ahr.id)
28. 0.005 1.016 ↑ 4.0 1 1

Nested Loop (cost=4.88..432.00 rows=4 width=225) (actual time=1.014..1.016 rows=1 loops=1)

29. 0.003 1.007 ↑ 4.0 1 1

Nested Loop Left Join (cost=4.60..429.83 rows=4 width=284) (actual time=1.005..1.007 rows=1 loops=1)

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

Nested Loop (cost=4.31..426.54 rows=8 width=212) (actual time=0.993..0.995 rows=1 loops=1)

31. 0.971 0.971 ↑ 3.0 1 1

Seq Scan on ad_hoc_request_group ahg_1 (cost=0.00..380.46 rows=3 width=173) (actual time=0.971..0.971 rows=1 loops=1)

  • Filter: (user_id = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid)
  • Rows Removed by Filter: 9477
32. 0.005 0.011 ↑ 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.011..0.011 rows=1 loops=1)

  • Recheck Cond: (ad_hoc_request_group_id = ahg_1.id)
  • Heap Blocks: exact=1
33. 0.006 0.006 ↑ 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.006..0.006 rows=1 loops=1)

  • Index Cond: (ad_hoc_request_group_id = ahg_1.id)
34. 0.009 0.009 ↑ 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.009..0.009 rows=1 loops=1)

  • Index Cond: (id = ahr_1.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
35. 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.004..0.004 rows=1 loops=1)

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

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

37. 0.000 0.012 ↓ 0.0 0 1

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

38. 0.001 0.012 ↓ 0.0 0 1

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

39. 0.001 0.007 ↑ 3.0 1 1

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

40. 0.001 0.004 ↑ 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.004..0.004 rows=1 loops=1)

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

  • Index Cond: (ad_hoc_review_id = ahrv_2.id)
44. 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)
45. 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 : 7.863 ms
Execution time : 1.750 ms