explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gTa6

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.429 ↑ 2.0 1 1

Append (cost=1.48..12.42 rows=2 width=296) (actual time=0.427..0.429 rows=1 loops=1)

2. 0.000 0.024 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.48..6.51 rows=1 width=296) (actual time=0.024..0.024 rows=0 loops=1)

3. 0.001 0.024 ↓ 0.0 0 1

Nested Loop (cost=1.37..5.18 rows=1 width=88) (actual time=0.024..0.024 rows=0 loops=1)

4. 0.002 0.023 ↓ 0.0 0 1

Bitmap Heap Scan on conversations sc (cost=1.32..2.65 rows=2 width=40) (actual time=0.023..0.023 rows=0 loops=1)

  • Recheck Cond: ((member_guid = '3d176a07-6cf1-dbf5-b3f5-60166d429290'::uuid) OR (other_member_guid = '3d176a07-6cf1-dbf5-b3f5-60166d429290'::uuid))
5. 0.001 0.021 ↓ 0.0 0 1

BitmapOr (cost=1.32..1.32 rows=2 width=0) (actual time=0.021..0.021 rows=0 loops=1)

6. 0.012 0.012 ↓ 0.0 0 1

Bitmap Index Scan on conversations_member_guid_idx (cost=0.00..0.66 rows=1 width=0) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: (member_guid = '3d176a07-6cf1-dbf5-b3f5-60166d429290'::uuid)
7. 0.008 0.008 ↓ 0.0 0 1

Bitmap Index Scan on conversations_other_member_guid_idx (cost=0.00..0.66 rows=1 width=0) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (other_member_guid = '3d176a07-6cf1-dbf5-b3f5-60166d429290'::uuid)
8. 0.000 0.000 ↓ 0.0 0

Index Scan using conversations_pk on conversations pc (cost=0.06..1.27 rows=1 width=56) (never executed)

  • Index Cond: (conversation_id = sc.conversation_id)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using member_profiles_pk on member_profiles mp (cost=0.11..1.32 rows=1 width=200) (never executed)

  • Index Cond: (member_guid = CASE WHEN ('3d176a07-6cf1-dbf5-b3f5-60166d429290'::uuid IS DISTINCT FROM sc.member_guid) THEN sc.member_guid ELSE sc.other_member_guid END)
10. 0.289 0.403 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.53..5.88 rows=1 width=296) (actual time=0.402..0.403 rows=1 loops=1)

11. 0.003 0.085 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.42..4.51 rows=1 width=256) (actual time=0.085..0.085 rows=1 loops=1)

12. 0.010 0.037 ↑ 1.0 1 1

Bitmap Heap Scan on mutual sm (cost=1.30..3.18 rows=1 width=56) (actual time=0.036..0.037 rows=1 loops=1)

  • Recheck Cond: ((member_guid = '09fb7157-8bfd-0959-dd7c-fe34a43f902a'::uuid) OR (other_member_guid = '09fb7157-8bfd-0959-dd7c-fe34a43f902a'::uuid))
  • Filter: ((member_guid = '09fb7157-8bfd-0959-dd7c-fe34a43f902a'::uuid) OR ((other_member_guid = '09fb7157-8bfd-0959-dd7c-fe34a43f902a'::uuid) AND (NOT (alternatives: SubPlan 1 or hashed SubPlan 2))))
  • Heap Blocks: exact=1
13. 0.002 0.027 ↓ 0.0 0 1

BitmapOr (cost=1.30..1.30 rows=1 width=0) (actual time=0.027..0.027 rows=0 loops=1)

14. 0.013 0.013 ↑ 1.0 1 1

Bitmap Index Scan on mutual_member_guid_idx (cost=0.00..0.65 rows=1 width=0) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: (member_guid = '09fb7157-8bfd-0959-dd7c-fe34a43f902a'::uuid)
15. 0.012 0.012 ↓ 0.0 0 1

Bitmap Index Scan on mutual_other_member_guid_idx (cost=0.00..0.65 rows=1 width=0) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: (other_member_guid = '09fb7157-8bfd-0959-dd7c-fe34a43f902a'::uuid)
16.          

SubPlan (for Bitmap Heap Scan)

17. 0.000 0.000 ↓ 0.0 0

Index Scan using conversations_other_member_guid_idx on conversations sc_1 (cost=0.06..1.27 rows=1 width=0) (never executed)

  • Index Cond: (other_member_guid = sm.other_member_guid)
  • Filter: (member_guid = sm.member_guid)
18. 0.000 0.000 ↓ 0.0 0

Seq Scan on conversations sc_2 (cost=0.00..134.36 rows=2,936 width=32) (never executed)

19. 0.045 0.045 ↑ 1.0 1 1

Index Scan using member_profiles_pk on member_profiles mp_1 (cost=0.11..1.32 rows=1 width=216) (actual time=0.044..0.045 rows=1 loops=1)

  • Index Cond: (member_guid = CASE WHEN ('09fb7157-8bfd-0959-dd7c-fe34a43f902a'::uuid IS DISTINCT FROM sm.member_guid) THEN sm.member_guid ELSE sm.other_member_guid END)
20. 0.029 0.029 ↑ 1.0 1 1

Index Scan using member_profiles_pk on member_profiles mp2 (cost=0.11..1.32 rows=1 width=32) (actual time=0.029..0.029 rows=1 loops=1)

  • Index Cond: (member_guid = CASE WHEN ('09fb7157-8bfd-0959-dd7c-fe34a43f902a'::uuid IS DISTINCT FROM sm.member_guid) THEN sm.other_member_guid ELSE sm.member_guid END)
Planning time : 1.165 ms