explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MLli

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

Append (cost=4.59..1,015.31 rows=10 width=205) (actual time=2.036..2.078 rows=1 loops=1)

2. 0.001 0.008 ↓ 0.0 0 1

Nested Loop (cost=4.59..40.51 rows=2 width=206) (actual time=0.008..0.008 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.001 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.003 ↓ 0.0 0 1

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

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

Bitmap Index Scan on complimenter_fk (cost=0.00..4.32 rows=4 width=0) (actual time=0.003..0.003 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.922 ↓ 0.0 0 1

GroupAggregate (cost=378.13..378.16 rows=1 width=135) (actual time=0.922..0.922 rows=0 loops=1)

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

Sort (cost=378.13..378.14 rows=1 width=187) (actual time=0.921..0.921 rows=0 loops=1)

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

Nested Loop (cost=0.56..378.12 rows=1 width=187) (actual time=0.915..0.916 rows=0 loops=1)

15. 0.000 0.915 ↓ 0.0 0 1

Nested Loop (cost=0.28..374.92 rows=1 width=115) (actual time=0.915..0.915 rows=0 loops=1)

16. 0.915 0.915 ↓ 0.0 0 1

Seq Scan on goal g (cost=0.00..358.31 rows=2 width=83) (actual time=0.915..0.915 rows=0 loops=1)

  • Filter: (user_id = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid)
  • Rows Removed by Filter: 8665
17. 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)
18. 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[]))
19. 0.001 0.055 ↓ 0.0 0 1

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

  • Filter: (ahrv.id IS NULL)
  • Rows Removed by Filter: 1
20. 0.003 0.047 ↑ 1.0 1 1

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

21. 0.003 0.036 ↑ 1.0 1 1

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

22. 0.005 0.024 ↑ 3.0 1 1

Bitmap Heap Scan on ad_hoc_request ahr (cost=4.32..15.34 rows=3 width=56) (actual time=0.023..0.024 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
23. 0.019 0.019 ↑ 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.019..0.019 rows=1 loops=1)

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

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

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

  • Index Cond: (ad_hoc_request_id = ahr.id)
27. 0.006 1.047 ↑ 4.0 1 1

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

28. 0.005 1.025 ↑ 4.0 1 1

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

  • Filter: ((ahr_1.user_id IS NULL) = (user_4.id IS NULL))
29. 0.009 0.990 ↑ 8.0 1 1

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

30. 0.972 0.972 ↑ 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.972..0.972 rows=1 loops=1)

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

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

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

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

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

36. 0.000 0.039 ↓ 0.0 0 1

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

37. 0.001 0.039 ↓ 0.0 0 1

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

38. 0.001 0.021 ↑ 3.0 1 1

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

39. 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
40. 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))
41. 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)
42. 0.017 0.017 ↓ 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.017..0.017 rows=0 loops=1)

  • Index Cond: (ad_hoc_review_id = ahrv_2.id)
43. 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)
44. 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 : 10.697 ms
Execution time : 2.854 ms