explain.depesz.com

PostgreSQL's explain analyze made readable

Result: V31U

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 7.252 ↑ 10.0 1 1

Append (cost=4.59..2,090.53 rows=10 width=205) (actual time=4.824..7.252 rows=1 loops=1)

2. 0.000 0.028 ↓ 0.0 0 1

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

3. 0.001 0.028 ↓ 0.0 0 1

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

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

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

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

7. 0.000 0.526 ↓ 0.0 0 1

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

8. 0.001 0.526 ↓ 0.0 0 1

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

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

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

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

  • Group Key: g.id, gc.seen
13. 0.012 1.071 ↓ 0.0 0 1

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

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

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

15. 0.026 1.058 ↓ 0.0 0 1

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

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

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

17. 0.001 1.024 ↓ 0.0 0 1

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

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

Seq Scan on goal g (cost=0.00..358.31 rows=2 width=83) (actual time=1.023..1.023 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.001 2.148 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.86..578.39 rows=1 width=225) (actual time=2.148..2.148 rows=0 loops=1)

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

Nested Loop (cost=0.57..570.07 rows=1 width=277) (actual time=2.141..2.142 rows=1 loops=1)

22. 0.003 2.132 ↑ 1.0 1 1

Nested Loop (cost=0.29..565.04 rows=1 width=205) (actual time=2.132..2.132 rows=1 loops=1)

23. 2.120 2.120 ↑ 3.0 1 1

Seq Scan on ad_hoc_request ahr (cost=0.00..540.05 rows=3 width=56) (actual time=2.120..2.120 rows=1 loops=1)

  • Filter: ((user_id IS NOT NULL) AND (denied IS NULL) AND (user_id = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid))
  • Rows Removed by Filter: 24484
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.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.005..0.005 rows=1 loops=1)

  • Index Cond: (ad_hoc_request_id = ahr.id)
27. 0.005 1.048 ↑ 4.0 1 1

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

28. 0.003 1.039 ↑ 4.0 1 1

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

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

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

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

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

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

  • Index Cond: (id = ahr_1.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
34. 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)
35. 0.000 2.425 ↓ 0.0 0 1

Nested Loop (cost=1.14..574.80 rows=1 width=225) (actual time=2.425..2.425 rows=0 loops=1)

36. 0.000 2.425 ↓ 0.0 0 1

Nested Loop (cost=0.85..574.26 rows=1 width=205) (actual time=2.425..2.425 rows=0 loops=1)

37. 0.002 2.425 ↓ 0.0 0 1

Nested Loop (cost=0.57..565.95 rows=1 width=64) (actual time=2.425..2.425 rows=0 loops=1)

38. 0.011 1.876 ↑ 3.0 1 1

Nested Loop (cost=0.29..564.97 rows=3 width=48) (actual time=1.875..1.876 rows=1 loops=1)

39. 1.836 1.836 ↑ 3.0 1 1

Seq Scan on ad_hoc_request ahr_2 (cost=0.00..540.05 rows=3 width=48) (actual time=1.836..1.836 rows=1 loops=1)

  • Filter: ((user_id IS NOT NULL) AND (user_id = 'ea72d7a1-8d6d-4348-9c35-bcae624d6cf6'::uuid))
  • Rows Removed by Filter: 24484
40. 0.029 0.029 ↑ 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.029..0.029 rows=1 loops=1)

  • Index Cond: (ad_hoc_request_id = ahr_2.id)
41. 0.547 0.547 ↓ 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.547..0.547 rows=0 loops=1)

  • Index Cond: (ad_hoc_review_id = ahrv_2.id)
42. 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)
43. 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 : 12.765 ms
Execution time : 8.453 ms