explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lCgp

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 1.426 ↓ 3.5 7 1

Append (cost=9.48..94.13 rows=2 width=265) (actual time=1.268..1.426 rows=7 loops=1)

2. 0.001 0.024 ↓ 0.0 0 1

Nested Loop Left Join (cost=9.48..41.19 rows=1 width=321) (actual time=0.024..0.024 rows=0 loops=1)

  • Filter: ((ahr.user_id IS NULL) = (user_1.id IS NULL))
3. 0.000 0.023 ↓ 0.0 0 1

Nested Loop Left Join (cost=9.19..40.78 rows=1 width=308) (actual time=0.023..0.023 rows=0 loops=1)

  • Filter: (ahrv.id IS NULL)
4. 0.000 0.023 ↓ 0.0 0 1

Nested Loop (cost=8.90..39.13 rows=3 width=308) (actual time=0.023..0.023 rows=0 loops=1)

5. 0.000 0.023 ↓ 0.0 0 1

Nested Loop (cost=4.59..23.74 rows=1 width=261) (actual time=0.023..0.023 rows=0 loops=1)

6. 0.002 0.023 ↓ 0.0 0 1

Bitmap Heap Scan on ad_hoc_request_group ahg (cost=4.31..15.43 rows=1 width=189) (actual time=0.023..0.023 rows=0 loops=1)

  • Recheck Cond: (user_id = '4b3b80dd-8871-43a8-8f3b-9ab79e9266a4'::uuid)
  • Filter: (expires > now())
7. 0.021 0.021 ↓ 0.0 0 1

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

  • Index Cond: (user_id = '4b3b80dd-8871-43a8-8f3b-9ab79e9266a4'::uuid)
8. 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 = '4b3b80dd-8871-43a8-8f3b-9ab79e9266a4'::uuid)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
9. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on ad_hoc_request ahr (cost=4.31..15.36 rows=3 width=79) (never executed)

  • Recheck Cond: (ad_hoc_request_group_id = ahg.id)
10. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ad_hoc_request_group_id_email_uk (cost=0.00..4.31 rows=3 width=0) (never executed)

  • Index Cond: (ad_hoc_request_group_id = ahg.id)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using ad_hoc_review_ad_hoc_request_id_key on ad_hoc_review ahrv (cost=0.29..0.54 rows=1 width=32) (never executed)

  • Index Cond: (ad_hoc_request_id = ahr.id)
12. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (id = ahr.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
13. 0.017 1.401 ↓ 7.0 7 1

Nested Loop Left Join (cost=9.90..52.91 rows=1 width=209) (actual time=1.244..1.401 rows=7 loops=1)

  • Filter: (qrv.id IS NULL)
14. 0.036 0.838 ↓ 7.0 7 1

Nested Loop Left Join (cost=9.61..52.21 rows=1 width=333) (actual time=0.701..0.838 rows=7 loops=1)

  • Filter: ((qr.user_id IS NULL) = (user_3.id IS NULL))
15. 0.011 0.795 ↓ 3.5 7 1

Nested Loop (cost=9.32..51.47 rows=2 width=245) (actual time=0.693..0.795 rows=7 loops=1)

16. 0.004 0.704 ↓ 4.0 4 1

Nested Loop (cost=4.89..35.69 rows=1 width=197) (actual time=0.670..0.704 rows=4 loops=1)

17. 0.005 0.068 ↓ 4.0 4 1

Nested Loop (cost=4.60..27.38 rows=1 width=170) (actual time=0.041..0.068 rows=4 loops=1)

18. 0.006 0.023 ↓ 4.0 4 1

Bitmap Heap Scan on questionnaire_request_group qg (cost=4.32..19.07 rows=1 width=98) (actual time=0.021..0.023 rows=4 loops=1)

  • Recheck Cond: (user_id = '4b3b80dd-8871-43a8-8f3b-9ab79e9266a4'::uuid)
  • Filter: (expires > now())
  • Heap Blocks: exact=1
19. 0.017 0.017 ↑ 1.0 4 1

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

  • Index Cond: (user_id = '4b3b80dd-8871-43a8-8f3b-9ab79e9266a4'::uuid)
20. 0.040 0.040 ↑ 1.0 1 4

Index Scan using user_pkey on "user" user_2 (cost=0.29..8.30 rows=1 width=88) (actual time=0.006..0.010 rows=1 loops=4)

  • Index Cond: (id = '4b3b80dd-8871-43a8-8f3b-9ab79e9266a4'::uuid)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
21. 0.632 0.632 ↑ 1.0 1 4

Index Scan using questionnaire_pkey on questionnaire q (cost=0.28..8.30 rows=1 width=43) (actual time=0.158..0.158 rows=1 loops=4)

  • Index Cond: (id = qg.questionnaire_id)
22. 0.008 0.080 ↑ 1.5 2 4

Bitmap Heap Scan on questionnaire_request qr (cost=4.44..15.76 rows=3 width=80) (actual time=0.019..0.020 rows=2 loops=4)

  • Recheck Cond: (questionnaire_request_group_id = qg.id)
  • Heap Blocks: exact=4
23. 0.072 0.072 ↑ 1.5 2 4

Bitmap Index Scan on questionnaire_request_group_id_email_uk (cost=0.00..4.44 rows=3 width=0) (actual time=0.018..0.018 rows=2 loops=4)

  • Index Cond: (questionnaire_request_group_id = qg.id)
24. 0.007 0.007 ↑ 1.0 1 7

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

  • Index Cond: (id = qr.user_id)
  • Filter: (status = ANY ('{invited,active}'::user_status[]))
25. 0.546 0.546 ↓ 0.0 0 7

Index Scan using questionnaire_review_questionnaire_request_id_key on questionnaire_review qrv (cost=0.29..0.69 rows=1 width=32) (actual time=0.078..0.078 rows=0 loops=7)

  • Index Cond: (questionnaire_request_id = qr.id)
Planning time : 9.869 ms
Execution time : 2.758 ms