explain.depesz.com

PostgreSQL's explain analyze made readable

Result: F18p

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 3.207 ↑ 10.0 1 1

Append (cost=4.59..1,041.11 rows=10 width=205) (actual time=2.586..3.207 rows=1 loops=1)

2. 0.000 0.005 ↓ 0.0 0 1

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

3. 0.001 0.005 ↓ 0.0 0 1

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

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

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

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

7. 0.000 0.003 ↓ 0.0 0 1

Nested Loop (cost=4.60..52.41 rows=1 width=134) (actual time=0.003..0.003 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.000 0.892 ↓ 0.0 0 1

GroupAggregate (cost=403.93..403.96 rows=1 width=135) (actual time=0.892..0.892 rows=0 loops=1)

  • Group Key: g.id, gc.seen
13. 0.011 0.892 ↓ 0.0 0 1

Sort (cost=403.93..403.94 rows=1 width=187) (actual time=0.891..0.892 rows=0 loops=1)

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

Nested Loop (cost=358.62..403.92 rows=1 width=187) (actual time=0.881..0.881 rows=0 loops=1)

15. 0.014 0.881 ↓ 0.0 0 1

Hash Join (cost=358.34..400.72 rows=1 width=115) (actual time=0.881..0.881 rows=0 loops=1)

  • Hash Cond: (gc.goal_id = g.id)
16. 0.005 0.005 ↑ 664.0 1 1

Seq Scan on goal_comment gc (cost=0.00..40.64 rows=664 width=48) (actual time=0.005..0.005 rows=1 loops=1)

17. 0.001 0.862 ↓ 0.0 0 1

Hash (cost=358.31..358.31 rows=2 width=83) (actual time=0.862..0.862 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
18. 0.861 0.861 ↓ 0.0 0 1

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

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

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

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

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

22. 0.002 0.590 ↑ 1.0 1 1

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

23. 0.006 0.579 ↑ 3.0 1 1

Bitmap Heap Scan on ad_hoc_request ahr (cost=4.32..15.34 rows=3 width=56) (actual time=0.578..0.579 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.573 0.573 ↑ 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.573..0.573 rows=1 loops=1)

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

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

  • Index Cond: (ad_hoc_request_id = ahr.id)
28. 0.006 1.081 ↑ 4.0 1 1

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

29. 0.003 1.060 ↑ 4.0 1 1

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

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

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

31. 1.009 1.009 ↑ 3.0 1 1

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

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

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

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

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

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

37. 0.000 0.618 ↓ 0.0 0 1

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

38. 0.002 0.618 ↓ 0.0 0 1

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

39. 0.003 0.610 ↑ 3.0 1 1

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

40. 0.002 0.005 ↑ 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.005 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.602 0.602 ↑ 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.602..0.602 rows=1 loops=1)

  • Index Cond: (ad_hoc_request_id = ahr_2.id)
43. 0.006 0.006 ↓ 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.006..0.006 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 : 6.895 ms
Execution time : 3.376 ms