explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LYlt

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 1.668 ↓ 5.5 22 1

Append (cost=1.49..24.39 rows=4 width=296) (actual time=0.073..1.668 rows=22 loops=1)

2. 0.008 0.169 ↓ 2.0 4 1

Nested Loop Left Join (cost=1.49..13.80 rows=2 width=296) (actual time=0.072..0.169 rows=4 loops=1)

3. 0.014 0.089 ↓ 2.0 4 1

Nested Loop (cost=1.38..11.15 rows=2 width=88) (actual time=0.045..0.089 rows=4 loops=1)

4. 0.031 0.055 ↑ 1.2 4 1

Bitmap Heap Scan on conversations sc (cost=1.32..4.81 rows=5 width=40) (actual time=0.031..0.055 rows=4 loops=1)

  • Recheck Cond: ((member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid) OR (other_member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid))
  • Heap Blocks: exact=3
5. 0.001 0.024 ↓ 0.0 0 1

BitmapOr (cost=1.32..1.32 rows=5 width=0) (actual time=0.024..0.024 rows=0 loops=1)

6. 0.015 0.015 ↑ 1.0 4 1

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

  • Index Cond: (member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::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 = '15138b8a-5420-7361-1e40-332888f8a382'::uuid)
8. 0.020 0.020 ↑ 1.0 1 4

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=4)

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

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

  • Index Cond: (member_guid = CASE WHEN ('15138b8a-5420-7361-1e40-332888f8a382'::uuid IS DISTINCT FROM sc.member_guid) THEN sc.member_guid ELSE sc.other_member_guid END)
10. 1.000 1.493 ↓ 9.0 18 1

Nested Loop Left Join (cost=1.55..10.53 rows=2 width=296) (actual time=0.394..1.493 rows=18 loops=1)

11. 0.030 0.331 ↓ 9.0 18 1

Nested Loop Left Join (cost=1.43..7.78 rows=2 width=256) (actual time=0.051..0.331 rows=18 loops=1)

12. 0.017 0.049 ↓ 9.0 18 1

Bitmap Heap Scan on mutual sm (cost=1.32..5.13 rows=2 width=56) (actual time=0.028..0.049 rows=18 loops=1)

  • Recheck Cond: ((member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid) OR (other_member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid))
  • Filter: ((member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid) OR ((other_member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid) AND (NOT (alternatives: SubPlan 1 or hashed SubPlan 2))))
  • Heap Blocks: exact=1
13. 0.001 0.023 ↓ 0.0 0 1

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

14. 0.012 0.012 ↓ 15.0 15 1

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

  • Index Cond: (member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid)
15. 0.010 0.010 ↓ 3.0 3 1

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

  • Index Cond: (other_member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid)
16.          

SubPlan (for Bitmap Heap Scan)

17. 0.009 0.009 ↓ 0.0 0 3

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

  • 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..135.08 rows=3,008 width=32) (never executed)

19. 0.252 0.252 ↑ 1.0 1 18

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

  • Index Cond: (member_guid = CASE WHEN ('15138b8a-5420-7361-1e40-332888f8a382'::uuid IS DISTINCT FROM sm.member_guid) THEN sm.member_guid ELSE sm.other_member_guid END)
20. 0.162 0.162 ↑ 1.0 1 18

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

  • Index Cond: (member_guid = CASE WHEN ('15138b8a-5420-7361-1e40-332888f8a382'::uuid IS DISTINCT FROM sm.member_guid) THEN sm.other_member_guid ELSE sm.member_guid END)
Planning time : 1.548 ms