explain.depesz.com

PostgreSQL's explain analyze made readable

Result: c6Kkq

Settings
# exclusive inclusive rows x rows loops node
1. 1.354 2.353 ↓ 11.5 23 1

Nested Loop Left Join (cost=1.55..10.53 rows=2 width=693) (actual time=0.742..2.353 rows=23 loops=1)

2. 0.035 0.884 ↓ 11.5 23 1

Nested Loop Left Join (cost=1.43..7.78 rows=2 width=256) (actual time=0.269..0.884 rows=23 loops=1)

3. 0.061 0.228 ↓ 11.5 23 1

Bitmap Heap Scan on mutual sm (cost=1.32..5.13 rows=2 width=56) (actual time=0.083..0.228 rows=23 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
4. 0.001 0.063 ↓ 0.0 0 1

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

5. 0.042 0.042 ↓ 30.0 30 1

Bitmap Index Scan on mutual_member_guid_idx (cost=0.00..0.66 rows=1 width=0) (actual time=0.041..0.042 rows=30 loops=1)

  • Index Cond: (member_guid = '66964ee7-4dca-55ab-9431-450b2e74b9ca'::uuid)
6. 0.020 0.020 ↓ 19.0 19 1

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

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

SubPlan (for Bitmap Heap Scan)

8. 0.104 0.104 ↓ 0.0 0 13

Index Scan using conversations_other_member_guid_idx on conversations sc (cost=0.06..1.27 rows=1 width=0) (actual time=0.008..0.008 rows=0 loops=13)

  • Index Cond: (other_member_guid = sm.other_member_guid)
  • Filter: (member_guid = sm.member_guid)
  • Rows Removed by Filter: 5
9. 0.000 0.000 ↓ 0.0 0

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

10. 0.621 0.621 ↑ 1.0 1 23

Index Scan using member_profiles_pk on member_profiles mp (cost=0.11..1.32 rows=1 width=216) (actual time=0.027..0.027 rows=1 loops=23)

  • 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)
11. 0.115 0.115 ↑ 1.0 1 23

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

  • 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.738 ms