explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0TdO

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 1.111 ↓ 4.2 25 1

Append (cost=1.50..39.33 rows=6 width=296) (actual time=0.069..1.111 rows=25 loops=1)

2. 0.009 0.265 ↓ 2.2 9 1

Nested Loop Left Join (cost=1.50..28.71 rows=4 width=296) (actual time=0.069..0.265 rows=9 loops=1)

3. 0.015 0.121 ↓ 2.2 9 1

Nested Loop (cost=1.39..23.41 rows=4 width=88) (actual time=0.042..0.121 rows=9 loops=1)

4. 0.030 0.051 ↑ 1.0 11 1

Bitmap Heap Scan on conversations sc (cost=1.33..9.47 rows=11 width=40) (actual time=0.027..0.051 rows=11 loops=1)

  • Recheck Cond: ((member_guid = '66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid) OR (other_member_guid = '66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid))
  • Heap Blocks: exact=9
5. 0.000 0.021 ↓ 0.0 0 1

BitmapOr (cost=1.33..1.33 rows=11 width=0) (actual time=0.021..0.021 rows=0 loops=1)

6. 0.013 0.013 ↑ 1.0 6 1

Bitmap Index Scan on conversations_member_guid_idx (cost=0.00..0.67 rows=6 width=0) (actual time=0.013..0.013 rows=6 loops=1)

  • Index Cond: (member_guid = '66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid)
7. 0.008 0.008 ↑ 1.0 5 1

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

  • Index Cond: (other_member_guid = '66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid)
8. 0.055 0.055 ↑ 1.0 1 11

Index Scan using conversations_pk on conversations pc (cost=0.06..1.27 rows=1 width=56) (actual time=0.005..0.005 rows=1 loops=11)

  • Index Cond: (conversation_id = sc.conversation_id)
9. 0.135 0.135 ↑ 1.0 1 9

Index Scan using member_profiles_pk on member_profiles mp (cost=0.11..1.32 rows=1 width=200) (actual time=0.015..0.015 rows=1 loops=9)

  • Index Cond: (member_guid = CASE WHEN ('66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid IS DISTINCT FROM sc.member_guid) THEN sc.member_guid ELSE sc.other_member_guid END)
10. 0.596 0.841 ↓ 8.0 16 1

Nested Loop Left Join (cost=1.55..10.53 rows=2 width=296) (actual time=0.226..0.841 rows=16 loops=1)

11. 0.011 0.197 ↓ 8.0 16 1

Nested Loop Left Join (cost=1.43..7.78 rows=2 width=256) (actual time=0.038..0.197 rows=16 loops=1)

12. 0.021 0.058 ↓ 8.0 16 1

Bitmap Heap Scan on mutual sm (cost=1.32..5.13 rows=2 width=56) (actual time=0.025..0.058 rows=16 loops=1)

  • Recheck Cond: ((member_guid = '66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid) OR (other_member_guid = '66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid))
  • Filter: ((member_guid = '66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid) OR ((other_member_guid = '66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid) AND (NOT (alternatives: SubPlan 1 or hashed SubPlan 2))))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=3
13. 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)

14. 0.013 0.013 ↓ 15.0 15 1

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

  • Index Cond: (member_guid = '66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid)
15. 0.007 0.007 ↓ 5.0 5 1

Bitmap Index Scan on mutual_other_member_guid_idx (cost=0.00..0.66 rows=1 width=0) (actual time=0.007..0.007 rows=5 loops=1)

  • Index Cond: (other_member_guid = '66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid)
16.          

SubPlan (for Bitmap Heap Scan)

17. 0.016 0.016 ↓ 0.0 0 4

Index Scan using conversations_other_member_guid_idx on conversations sc_1 (cost=0.06..1.27 rows=1 width=0) (actual time=0.004..0.004 rows=0 loops=4)

  • Index Cond: (other_member_guid = sm.other_member_guid)
  • Filter: (member_guid = sm.member_guid)
  • Rows Removed by Filter: 4
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.128 0.128 ↓ 0.0 0 16

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

  • Index Cond: (member_guid = CASE WHEN ('66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid IS DISTINCT FROM sm.member_guid) THEN sm.member_guid ELSE sm.other_member_guid END)
20. 0.048 0.048 ↑ 1.0 1 16

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

  • Index Cond: (member_guid = CASE WHEN ('66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid IS DISTINCT FROM sm.member_guid) THEN sm.other_member_guid ELSE sm.member_guid END)
Planning time : 0.855 ms