explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mMvr

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 1.720 ↓ 5.5 22 1

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

  • Buffers: shared hit=374
2. 0.007 0.385 ↓ 2.0 4 1

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

  • Output: sc.member_guid, sc.other_member_guid, NULL::bigint, NULL::timestamp with time zone, NULL::timestamp with time zone, pc.conversation_id, pc.member_conversation_legacy_id, pc.other_member_conversation_legacy_id, pc.member_latest_message_sent_tstamp, pc.other_member_latest_message_sent_tstamp, pc.conversation_depth, pc.is_either_member_blocked, pc.is_member_latest_message_sender, pc.member_has_new_message, pc.other_member_has_new_message, pc.is_conversation_removed_by_member, pc.is_conversation_removed_by_other_member, pc.is_member_deleted, pc.is_member_ghosted, pc.is_other_member_deleted, pc.is_other_member_ghosted, pc.member_has_priority_message, pc.other_member_has_priority_message, pc.latest_message_type_id, mp.gender_identity_type, mp.first_name, mp.home_city_name, mp.main_image_thumbnail_url, mp.last_activity_tstamp, mp.date_of_birth, mp.legacy_profile_id, mp.is_upgraded, mp.username, mp.headline, mp.show_firstname, mp.seeking_gender
  • Inner Unique: true
  • Buffers: shared hit=39
3. 0.011 0.118 ↓ 2.0 4 1

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

  • Output: pc.conversation_id, pc.member_conversation_legacy_id, pc.other_member_conversation_legacy_id, pc.member_latest_message_sent_tstamp, pc.other_member_latest_message_sent_tstamp, pc.conversation_depth, pc.is_either_member_blocked, pc.is_member_latest_message_sender, pc.member_has_new_message, pc.other_member_has_new_message, pc.is_conversation_removed_by_member, pc.is_conversation_removed_by_other_member, pc.is_member_deleted, pc.is_member_ghosted, pc.is_other_member_deleted, pc.is_other_member_ghosted, pc.member_has_priority_message, pc.other_member_has_priority_message, pc.latest_message_type_id, sc.member_guid, sc.other_member_guid
  • Inner Unique: true
  • Buffers: shared hit=19
4. 0.019 0.071 ↑ 1.2 4 1

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

  • Output: sc.conversation_id, sc.member_guid, sc.other_member_guid, sc.member_removed_tstamp, sc.other_member_removed_tstamp, sc.member_read_tstamp, sc.other_member_read_tstamp, sc.inserted_tstamp
  • Recheck Cond: ((sc.member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid) OR (sc.other_member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid))
  • Heap Blocks: exact=3
  • Buffers: shared hit=7
5. 0.002 0.052 ↓ 0.0 0 1

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

  • Buffers: shared hit=4
6. 0.031 0.031 ↑ 1.0 4 1

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

  • Index Cond: (sc.member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid)
  • Buffers: shared hit=2
7. 0.019 0.019 ↓ 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.019..0.019 rows=0 loops=1)

  • Index Cond: (sc.other_member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid)
  • Buffers: shared hit=2
8. 0.036 0.036 ↑ 1.0 1 4

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

  • Output: pc.conversation_id, pc.member_conversation_legacy_id, pc.other_member_conversation_legacy_id, pc.member_latest_message_sent_tstamp, pc.other_member_latest_message_sent_tstamp, pc.latest_message_type_id, pc.conversation_depth, pc.is_either_member_blocked, pc.is_member_latest_message_sender, pc.member_has_new_message, pc.other_member_has_new_message, pc.is_conversation_removed_by_member, pc.is_conversation_removed_by_other_member, pc.is_member_deleted, pc.is_member_ghosted, pc.is_other_member_deleted, pc.is_other_member_ghosted, pc.member_has_priority_message, pc.other_member_has_priority_message
  • Index Cond: (pc.conversation_id = sc.conversation_id)
  • Buffers: shared hit=12
9. 0.260 0.260 ↑ 1.0 1 4

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

  • Output: mp.gender_identity_type, mp.first_name, mp.home_city_name, mp.main_image_thumbnail_url, mp.last_activity_tstamp, mp.date_of_birth, mp.legacy_profile_id, mp.is_upgraded, mp.username, mp.headline, mp.show_firstname, mp.seeking_gender, mp.member_guid
  • Index Cond: (mp.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)
  • Buffers: shared hit=20
10. 0.868 1.331 ↓ 9.0 18 1

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

  • Output: sm.member_guid, sm.other_member_guid, sm.mutual_id, sm.inserted_tstamp, sm.created_tstamp, NULL::bigint, NULL::bigint, NULL::bigint, NULL::timestamp with time zone, NULL::timestamp with time zone, NULL::smallint, source.calculate_is_either_member_blocked(sm.member_guid, sm.other_member_guid), NULL::boolean, NULL::boolean, NULL::boolean, NULL::boolean, NULL::boolean, (mp2.member_deleted_tstamp IS NOT NULL), (mp2.member_ghosted_tstamp IS NOT NULL), (mp_1.member_deleted_tstamp IS NOT NULL), (mp_1.member_ghosted_tstamp IS NOT NULL), NULL::boolean, NULL::boolean, NULL::smallint, mp_1.gender_identity_type, mp_1.first_name, mp_1.home_city_name, mp_1.main_image_thumbnail_url, mp_1.last_activity_tstamp, mp_1.date_of_birth, mp_1.legacy_profile_id, mp_1.is_upgraded, mp_1.username, mp_1.headline, mp_1.show_firstname, mp_1.seeking_gender
  • Inner Unique: true
  • Buffers: shared hit=335
11. 0.011 0.373 ↓ 9.0 18 1

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

  • Output: sm.member_guid, sm.other_member_guid, sm.mutual_id, sm.inserted_tstamp, sm.created_tstamp, mp_1.member_deleted_tstamp, mp_1.member_ghosted_tstamp, mp_1.gender_identity_type, mp_1.first_name, mp_1.home_city_name, mp_1.main_image_thumbnail_url, mp_1.last_activity_tstamp, mp_1.date_of_birth, mp_1.legacy_profile_id, mp_1.is_upgraded, mp_1.username, mp_1.headline, mp_1.show_firstname, mp_1.seeking_gender
  • Inner Unique: true
  • Buffers: shared hit=101
12. 0.018 0.110 ↓ 9.0 18 1

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

  • Output: sm.mutual_id, sm.member_guid, sm.other_member_guid, sm.inserted_tstamp, sm.created_tstamp
  • Recheck Cond: ((sm.member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid) OR (sm.other_member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid))
  • Filter: ((sm.member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid) OR ((sm.other_member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid) AND (NOT (alternatives: SubPlan 1 or hashed SubPlan 2))))
  • Heap Blocks: exact=1
  • Buffers: shared hit=11
13. 0.001 0.086 ↓ 0.0 0 1

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

  • Buffers: shared hit=4
14. 0.068 0.068 ↓ 15.0 15 1

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

  • Index Cond: (sm.member_guid = '15138b8a-5420-7361-1e40-332888f8a382'::uuid)
  • Buffers: shared hit=2
15. 0.017 0.017 ↓ 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.017..0.017 rows=3 loops=1)

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

SubPlan (for Bitmap Heap Scan)

17. 0.006 0.006 ↓ 0.0 0 3

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

  • Index Cond: (sc_1.other_member_guid = sm.other_member_guid)
  • Filter: (sc_1.member_guid = sm.member_guid)
  • Buffers: shared hit=6
18. 0.000 0.000 ↓ 0.0 0

Seq Scan on source_v2.conversations sc_2 (cost=0.00..135.08 rows=3,008 width=32) (never executed)

  • Output: sc_2.member_guid, sc_2.other_member_guid
19. 0.252 0.252 ↑ 1.0 1 18

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

  • Output: mp_1.member_deleted_tstamp, mp_1.member_ghosted_tstamp, mp_1.gender_identity_type, mp_1.first_name, mp_1.home_city_name, mp_1.main_image_thumbnail_url, mp_1.last_activity_tstamp, mp_1.date_of_birth, mp_1.legacy_profile_id, mp_1.is_upgraded, mp_1.username, mp_1.headline, mp_1.show_firstname, mp_1.seeking_gender, mp_1.member_guid
  • Index Cond: (mp_1.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)
  • Buffers: shared hit=90
20. 0.090 0.090 ↑ 1.0 1 18

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

  • Output: mp2.member_deleted_tstamp, mp2.member_ghosted_tstamp, mp2.member_guid
  • Index Cond: (mp2.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)
  • Buffers: shared hit=90
Planning time : 1.020 ms