explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YyBS

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 77,711.289 ↓ 8.0 8 1

Limit (cost=12,229,079.78..12,229,079.79 rows=1 width=950) (actual time=77,711.286..77,711.289 rows=8 loops=1)

  • Output: tickets.id, tickets.status, tickets.created_at, tickets.updated_at, tickets.category, tickets.assignable_id, tickets.assignable_type, tickets.options, tickets.tags, tickets.request_type, tickets.external_id, tickets.lock_version, tickets.last_client_read, tickets.metadata, tickets.group_id, tickets.enrichments, tickets.client_replied, tickets.external, tickets.origin, tickets.corrupted, tickets.import_mention_thread_comments, tickets.bot_category, tickets.language, tickets.external_url, tickets.priority, tickets.post_type, tickets.hierarchy_tag_id, tickets.ancestry, tickets.last_client_message_created_at, tickets.closed_at, tickets.uuid
  • Buffers: shared hit=37290862 read=179990
2. 0.024 77,711.288 ↓ 8.0 8 1

Sort (cost=12,229,079.78..12,229,079.79 rows=1 width=950) (actual time=77,711.285..77,711.288 rows=8 loops=1)

  • Output: tickets.id, tickets.status, tickets.created_at, tickets.updated_at, tickets.category, tickets.assignable_id, tickets.assignable_type, tickets.options, tickets.tags, tickets.request_type, tickets.external_id, tickets.lock_version, tickets.last_client_read, tickets.metadata, tickets.group_id, tickets.enrichments, tickets.client_replied, tickets.external, tickets.origin, tickets.corrupted, tickets.import_mention_thread_comments, tickets.bot_category, tickets.language, tickets.external_url, tickets.priority, tickets.post_type, tickets.hierarchy_tag_id, tickets.ancestry, tickets.last_client_message_created_at, tickets.closed_at, tickets.uuid
  • Sort Key: tickets.created_at
  • Sort Method: quicksort Memory: 28kB
  • Buffers: shared hit=37290862 read=179990
3. 0.007 77,711.264 ↓ 8.0 8 1

Nested Loop (cost=12,225,840.06..12,229,079.77 rows=1 width=950) (actual time=77,705.564..77,711.264 rows=8 loops=1)

  • Output: tickets.id, tickets.status, tickets.created_at, tickets.updated_at, tickets.category, tickets.assignable_id, tickets.assignable_type, tickets.options, tickets.tags, tickets.request_type, tickets.external_id, tickets.lock_version, tickets.last_client_read, tickets.metadata, tickets.group_id, tickets.enrichments, tickets.client_replied, tickets.external, tickets.origin, tickets.corrupted, tickets.import_mention_thread_comments, tickets.bot_category, tickets.language, tickets.external_url, tickets.priority, tickets.post_type, tickets.hierarchy_tag_id, tickets.ancestry, tickets.last_client_message_created_at, tickets.closed_at, tickets.uuid
  • Buffers: shared hit=37290862 read=179990
4. 0.051 77,711.225 ↓ 8.0 8 1

Nested Loop (cost=12,225,839.80..12,229,077.28 rows=1 width=954) (actual time=77,705.554..77,711.225 rows=8 loops=1)

  • Output: tickets.id, tickets.status, tickets.created_at, tickets.updated_at, tickets.category, tickets.assignable_id, tickets.assignable_type, tickets.options, tickets.tags, tickets.request_type, tickets.external_id, tickets.lock_version, tickets.last_client_read, tickets.metadata, tickets.group_id, tickets.enrichments, tickets.client_replied, tickets.external, tickets.origin, tickets.corrupted, tickets.import_mention_thread_comments, tickets.bot_category, tickets.language, tickets.external_url, tickets.priority, tickets.post_type, tickets.hierarchy_tag_id, tickets.ancestry, tickets.last_client_message_created_at, tickets.closed_at, tickets.uuid, items.source_id
  • Buffers: shared hit=37290837 read=179990
5. 0.099 77,711.134 ↓ 8.0 8 1

Nested Loop (cost=12,225,838.24..12,229,074.59 rows=1 width=954) (actual time=77,705.532..77,711.134 rows=8 loops=1)

  • Output: tickets.id, tickets.status, tickets.created_at, tickets.updated_at, tickets.category, tickets.assignable_id, tickets.assignable_type, tickets.options, tickets.tags, tickets.request_type, tickets.external_id, tickets.lock_version, tickets.last_client_read, tickets.metadata, tickets.group_id, tickets.enrichments, tickets.client_replied, tickets.external, tickets.origin, tickets.corrupted, tickets.import_mention_thread_comments, tickets.bot_category, tickets.language, tickets.external_url, tickets.priority, tickets.post_type, tickets.hierarchy_tag_id, tickets.ancestry, tickets.last_client_message_created_at, tickets.closed_at, tickets.uuid, items.source_id
  • Buffers: shared hit=37290772 read=179990
6. 629.422 77,710.987 ↑ 145.4 8 1

Index Scan using index_tickets_on_status_nulls_first on public.tickets (cost=12,225,836.68..12,225,940.75 rows=1,163 width=950) (actual time=77,705.489..77,710.987 rows=8 loops=1)

  • Output: tickets.id, tickets.status, tickets.created_at, tickets.updated_at, tickets.category, tickets.assignable_id, tickets.assignable_type, tickets.options, tickets.tags, tickets.request_type, tickets.external_id, tickets.lock_version, tickets.last_client_read, tickets.metadata, tickets.group_id, tickets.enrichments, tickets.client_replied, tickets.external, tickets.origin, tickets.corrupted, tickets.import_mention_thread_comments, tickets.bot_category, tickets.language, tickets.external_url, tickets.priority, tickets.post_type, tickets.hierarchy_tag_id, tickets.ancestry, tickets.last_client_message_created_at, tickets.closed_at, tickets.uuid
  • Index Cond: ((tickets.status)::text = ANY ('{assigned_to_pool,assigned_to_pool_operator,follow_up,waiting_for_client_feedback}'::text[]))
  • Filter: ((NOT ('{"Competenza Tre da Business"}'::character varying[] && tickets.tags)) AND ((hashed SubPlan 3) OR (hashed SubPlan 4) OR (hashed SubPlan 5) OR (hashed SubPlan 6)))
  • Rows Removed by Filter: 1516
  • Buffers: shared hit=37290707 read=179989
7.          

SubPlan (for Index Scan)

8. 0.194 11,241.937 ↑ 2,917.9 1,520 1

Subquery Scan on items_3 (cost=2,914,295.05..3,058,437.85 rows=4,435,163 width=4) (actual time=11,241.152..11,241.937 rows=1,520 loops=1)

  • Output: items_3.ticket_id
  • Buffers: shared hit=9367173 read=1160
9. 0.343 11,241.743 ↑ 2,917.9 1,520 1

Unique (cost=2,914,295.05..3,014,086.22 rows=4,435,163 width=1,092) (actual time=11,241.151..11,241.743 rows=1,520 loops=1)

  • Output: items_4.id, items_4.type, items_4.ticket_id, items_4.author_type, items_4.author_id, items_4.body, items_4.created_at, items_4.updated_at
  • Buffers: shared hit=9367173 read=1160
10. 1.212 11,241.400 ↑ 2,917.9 1,520 1

Sort (cost=2,914,295.05..2,925,382.96 rows=4,435,163 width=1,092) (actual time=11,241.150..11,241.400 rows=1,520 loops=1)

  • Output: items_4.id, items_4.type, items_4.ticket_id, items_4.author_type, items_4.author_id, items_4.body, items_4.created_at, items_4.updated_at
  • Sort Key: items_4.id, items_4.type, items_4.ticket_id, items_4.author_type, items_4.author_id, items_4.body, items_4.created_at, items_4.updated_at
  • Sort Method: quicksort Memory: 443kB
  • Buffers: shared hit=9367173 read=1160
11. 0.180 11,240.188 ↑ 2,917.9 1,520 1

Append (cost=47,263.58..1,181,582.23 rows=4,435,163 width=1,092) (actual time=5,027.697..11,240.188 rows=1,520 loops=1)

  • Buffers: shared hit=9367173 read=1160
12. 491.326 7,532.931 ↑ 2,274.6 1,520 1

Hash Semi Join (cost=47,263.58..668,547.43 rows=3,457,397 width=205) (actual time=5,027.696..7,532.931 rows=1,520 loops=1)

  • Output: items_4.id, items_4.type, items_4.ticket_id, items_4.author_type, items_4.author_id, items_4.body, items_4.created_at, items_4.updated_at
  • Hash Cond: (items_4.author_id = social_profiles.id)
  • Buffers: shared hit=3857461
13. 2,157.094 6,857.876 ↓ 1.3 4,532,978 1

Hash Semi Join (cost=15.49..573,756.20 rows=3,458,896 width=205) (actual time=0.120..6,857.876 rows=4,532,978 loops=1)

  • Output: items_4.id, items_4.type, items_4.ticket_id, items_4.author_type, items_4.author_id, items_4.body, items_4.created_at, items_4.updated_at
  • Hash Cond: (items_4.source_id = sources_1.id)
  • Buffers: shared hit=3826693
14. 4,700.710 4,700.710 ↓ 1.1 4,532,978 1

Index Scan using test_items_authors_social_profile on public.items items_4 (cost=0.43..524,885.03 rows=3,952,723 width=209) (actual time=0.033..4,700.710 rows=4,532,978 loops=1)

  • Output: items_4.id, items_4.ticket_id, items_4.source_id, items_4.author_id, items_4.external_id, items_4.body, items_4.created_at, items_4.updated_at, items_4.type, items_4.last_read_at, items_4.author_type, items_4.token, items_4.subject, items_4.external_date, items_4.satisfaction, items_4.vote, items_4.social_feedback, items_4.parent_external_id, items_4.can_reply, items_4.deleted_flag, items_4.job_id, items_4.enrichments, items_4.tags, items_4.response_template_id, items_4.retweet_of, items_4.ancestry, items_4.is_mention, items_4.originator_message_id, items_4.message_type, items_4.tagged_at, items_4.metadata, items_4.client_reply_id, items_4.selected_reply_id, items_4.uuid, items_4.switched_private, items_4.external_api_id
  • Index Cond: ((items_4.type)::text = 'Message'::text)
  • Buffers: shared hit=3826635
15. 0.014 0.072 ↑ 1.0 58 1

Hash (cost=14.34..14.34 rows=58 width=4) (actual time=0.072..0.072 rows=58 loops=1)

  • Output: sources_1.id
  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
16. 0.058 0.058 ↑ 1.0 58 1

Index Only Scan using index_sources_on_id_and_workspace_id on public.sources sources_1 (cost=0.27..14.34 rows=58 width=4) (actual time=0.009..0.058 rows=58 loops=1)

  • Output: sources_1.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
17. 0.292 183.729 ↑ 1,714.3 589 1

Hash (cost=34,626.45..34,626.45 rows=1,009,731 width=4) (actual time=183.729..183.729 rows=589 loops=1)

  • Output: social_profiles.id
  • Buckets: 1048576 Batches: 1 Memory Usage: 8213kB
  • Buffers: shared hit=30768
18. 0.426 183.437 ↑ 1,714.3 589 1

Nested Loop (cost=34,624.77..34,626.45 rows=1,009,731 width=4) (actual time=178.717..183.437 rows=589 loops=1)

  • Output: social_profiles.id
  • Buffers: shared hit=30768
19. 0.545 178.888 ↓ 147.2 589 1

HashAggregate (cost=34,624.34..34,624.38 rows=4 width=15) (actual time=178.681..178.888 rows=589 loops=1)

  • Output: client_users.id, client_users_1.id, custom_field_values.binded_key
  • Group Key: client_users.id
  • Buffers: shared hit=28408
20. 7.220 178.343 ↓ 147.2 589 1

Gather (cost=9,186.85..34,624.33 rows=4 width=15) (actual time=7.876..178.343 rows=589 loops=1)

  • Output: client_users.id, client_users_1.id, custom_field_values.binded_key
  • Workers Planned: 3
  • Workers Launched: 3
  • Buffers: shared hit=28408
21. 118.489 171.123 ↓ 147.0 147 4 / 4

Hash Semi Join (cost=8,186.85..33,623.93 rows=1 width=15) (actual time=30.750..171.123 rows=147 loops=4)

  • Output: client_users.id, client_users_1.id, custom_field_values.binded_key
  • Hash Cond: (client_users.id = client_users_1.id)
  • Buffers: shared hit=27622
  • Worker 0: actual time=34.499..166.169 rows=158 loops=1
  • Buffers: shared hit=6850
  • Worker 1: actual time=33.478..171.903 rows=153 loops=1
  • Buffers: shared hit=6822
  • Worker 2: actual time=47.896..170.086 rows=135 loops=1
  • Buffers: shared hit=6002
22. 46.563 46.563 ↑ 1.3 331,571 4 / 4

Parallel Seq Scan on public.client_users (cost=0.00..24,329.26 rows=422,026 width=4) (actual time=0.012..46.563 rows=331,571 loops=4)

  • Output: client_users.id, client_users.created_at, client_users.updated_at, client_users.terms_of_service, client_users.client_code, client_users.pool, client_users.email, client_users.unconfirmed_email, client_users.confirmation_token, client_users.confirmed_at, client_users.confirmation_sent_at, client_users.notifier, client_users.notification_token, client_users.notification_token_type, client_users.note, client_users.bot_routing, client_users.approved_at
  • Buffers: shared hit=20109
  • Worker 0: actual time=0.009..48.218 rows=320480 loops=1
  • Buffers: shared hit=4968
  • Worker 1: actual time=0.014..51.531 rows=318842 loops=1
  • Buffers: shared hit=4940
  • Worker 2: actual time=0.020..43.175 rows=263217 loops=1
  • Buffers: shared hit=4120
23. 0.247 6.071 ↑ 1,110.6 589 4 / 4

Hash (cost=10.09..10.09 rows=654,140 width=11) (actual time=6.071..6.071 rows=589 loops=4)

  • Output: client_users_1.id, custom_field_values.binded_key
  • Buckets: 1048576 Batches: 1 Memory Usage: 8218kB
  • Buffers: shared hit=7474
  • Worker 0: actual time=5.747..5.747 rows=589 loops=1
  • Buffers: shared hit=1869
  • Worker 1: actual time=6.623..6.623 rows=589 loops=1
  • Buffers: shared hit=1869
  • Worker 2: actual time=9.256..9.256 rows=589 loops=1
  • Buffers: shared hit=1869
24. 0.317 5.824 ↑ 1,110.6 589 4 / 4

Nested Loop (cost=3.15..10.09 rows=654,140 width=11) (actual time=0.711..5.824 rows=589 loops=4)

  • Output: client_users_1.id, custom_field_values.binded_key
  • Buffers: shared hit=7474
  • Worker 0: actual time=0.638..5.502 rows=589 loops=1
  • Buffers: shared hit=1869
  • Worker 1: actual time=0.688..6.386 rows=589 loops=1
  • Buffers: shared hit=1869
  • Worker 2: actual time=1.134..8.870 rows=589 loops=1
  • Buffers: shared hit=1869
25. 0.340 0.795 ↓ 147.2 589 4 / 4

HashAggregate (cost=2.71..2.75 rows=4 width=7) (actual time=0.644..0.795 rows=589 loops=4)

  • Output: custom_field_values.binded_key
  • Group Key: (custom_field_values.binded_key)::integer
  • Buffers: shared hit=103
  • Worker 0: actual time=0.570..0.707 rows=589 loops=1
  • Buffers: shared hit=26
  • Worker 1: actual time=0.611..0.754 rows=589 loops=1
  • Buffers: shared hit=26
  • Worker 2: actual time=1.029..1.287 rows=589 loops=1
  • Buffers: shared hit=26
26. 0.455 0.455 ↓ 147.2 589 4 / 4

Index Only Scan using test_cfv_deleted_null_value_cf_id_binded_key on public.custom_field_values (cost=0.42..2.71 rows=4 width=7) (actual time=0.087..0.455 rows=589 loops=4)

  • Output: custom_field_values.binded_key, (custom_field_values.binded_key)::integer
  • Index Cond: ((custom_field_values.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid) AND (custom_field_values.value IS NULL))
  • Heap Fetches: 18
  • Buffers: shared hit=103
  • Worker 0: actual time=0.094..0.412 rows=589 loops=1
  • Buffers: shared hit=26
  • Worker 1: actual time=0.097..0.447 rows=589 loops=1
  • Buffers: shared hit=26
  • Worker 2: actual time=0.131..0.727 rows=589 loops=1
  • Buffers: shared hit=26
27. 4.712 4.712 ↑ 1.0 1 2,356 / 4

Index Only Scan using client_users_pkey on public.client_users client_users_1 (cost=0.43..1.82 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=2,356)

  • Output: client_users_1.id
  • Index Cond: (client_users_1.id = (custom_field_values.binded_key)::integer)
  • Heap Fetches: 72
  • Buffers: shared hit=7371
  • Worker 0: actual time=0.008..0.008 rows=1 loops=589
  • Buffers: shared hit=1843
  • Worker 1: actual time=0.009..0.009 rows=1 loops=589
  • Buffers: shared hit=1843
  • Worker 2: actual time=0.012..0.012 rows=1 loops=589
  • Buffers: shared hit=1843
28. 4.123 4.123 ↑ 2.0 1 589

Index Scan using index_social_profiles_on_client_user_id on public.social_profiles (cost=0.43..0.50 rows=2 width=8) (actual time=0.007..0.007 rows=1 loops=589)

  • Output: social_profiles.client_user_id, social_profiles.id
  • Index Cond: (social_profiles.client_user_id = client_users_1.id)
  • Buffers: shared hit=2360
29. 0.016 3,707.077 ↓ 0.0 0 1

Hash Semi Join (cost=79,988.08..468,683.17 rows=977,766 width=205) (actual time=3,707.077..3,707.077 rows=0 loops=1)

  • Output: items_5.id, items_5.type, items_5.ticket_id, items_5.author_type, items_5.author_id, items_5.body, items_5.created_at, items_5.updated_at
  • Hash Cond: (items_5.source_id = sources_2.id)
  • Buffers: shared hit=5509712 read=1160
30. 169.287 3,706.971 ↓ 0.0 0 1

Merge Semi Join (cost=79,973.02..454,857.39 rows=1,117,362 width=209) (actual time=3,706.971..3,706.971 rows=0 loops=1)

  • Output: items_5.id, items_5.type, items_5.ticket_id, items_5.author_type, items_5.author_id, items_5.body, items_5.created_at, items_5.updated_at, items_5.source_id
  • Merge Cond: (items_5.author_id = client_users_3.id)
  • Buffers: shared hit=5509654 read=1160
31. 1,371.493 1,371.493 ↓ 1.1 1,237,190 1

Index Scan using test_items_authors_client_user on public.items items_5 (cost=0.43..402,406.79 rows=1,117,846 width=209) (actual time=0.020..1,371.493 rows=1,237,190 loops=1)

  • Output: items_5.id, items_5.ticket_id, items_5.source_id, items_5.author_id, items_5.external_id, items_5.body, items_5.created_at, items_5.updated_at, items_5.type, items_5.last_read_at, items_5.author_type, items_5.token, items_5.subject, items_5.external_date, items_5.satisfaction, items_5.vote, items_5.social_feedback, items_5.parent_external_id, items_5.can_reply, items_5.deleted_flag, items_5.job_id, items_5.enrichments, items_5.tags, items_5.response_template_id, items_5.retweet_of, items_5.ancestry, items_5.is_mention, items_5.originator_message_id, items_5.message_type, items_5.tagged_at, items_5.metadata, items_5.client_reply_id, items_5.selected_reply_id, items_5.uuid, items_5.switched_private, items_5.external_api_id
  • Index Cond: ((items_5.type)::text = 'Message'::text)
  • Buffers: shared hit=1213107 read=1147
32. 0.140 2,166.191 ↑ 1,110.6 589 1

Materialize (cost=3.61..69,102.48 rows=654,140 width=15) (actual time=1,551.299..2,166.191 rows=589 loops=1)

  • Output: client_users_2.id, client_users_3.id, custom_field_values_1.binded_key
  • Buffers: shared hit=4296547 read=13
33. 591.647 2,166.051 ↑ 1,110.6 589 1

Nested Loop Semi Join (cost=3.61..67,467.13 rows=654,140 width=15) (actual time=1,551.296..2,166.051 rows=589 loops=1)

  • Output: client_users_2.id, client_users_3.id, custom_field_values_1.binded_key
  • Buffers: shared hit=4296547 read=13
34. 248.120 248.120 ↓ 1.0 1,326,284 1

Index Only Scan using client_users_pkey on public.client_users client_users_2 (cost=0.43..23,674.74 rows=1,308,280 width=4) (actual time=0.014..248.120 rows=1,326,284 loops=1)

  • Output: client_users_2.id
  • Heap Fetches: 182885
  • Buffers: shared hit=127672
35. 0.000 1,326.284 ↓ 0.0 0 1,326,284

Hash Semi Join (cost=3.18..3.21 rows=1 width=11) (actual time=0.001..0.001 rows=0 loops=1,326,284)

  • Output: client_users_3.id, custom_field_values_1.binded_key
  • Hash Cond: (client_users_3.id = (custom_field_values_1.binded_key)::integer)
  • Buffers: shared hit=4168875 read=13
36. 1,326.284 1,326.284 ↑ 1.0 1 1,326,284

Index Only Scan using client_users_pkey on public.client_users client_users_3 (cost=0.43..0.45 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=1,326,284)

  • Output: client_users_3.id
  • Index Cond: (client_users_3.id = client_users_2.id)
  • Heap Fetches: 182885
  • Buffers: shared hit=4168850 read=13
37. 0.140 0.266 ↓ 147.2 589 1

Hash (cost=2.71..2.71 rows=4 width=7) (actual time=0.266..0.266 rows=589 loops=1)

  • Output: custom_field_values_1.binded_key
  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
  • Buffers: shared hit=25
38. 0.126 0.126 ↓ 147.2 589 1

Index Only Scan using test_cfv_deleted_null_value_cf_id_binded_key on public.custom_field_values custom_field_values_1 (cost=0.42..2.71 rows=4 width=7) (actual time=0.016..0.126 rows=589 loops=1)

  • Output: custom_field_values_1.binded_key
  • Index Cond: ((custom_field_values_1.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid) AND (custom_field_values_1.value IS NULL))
  • Heap Fetches: 18
  • Buffers: shared hit=25
39. 0.014 0.090 ↑ 1.0 58 1

Hash (cost=14.34..14.34 rows=58 width=4) (actual time=0.090..0.090 rows=58 loops=1)

  • Output: sources_2.id
  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
40. 0.076 0.076 ↑ 1.0 58 1

Index Only Scan using index_sources_on_id_and_workspace_id on public.sources sources_2 (cost=0.27..14.34 rows=58 width=4) (actual time=0.008..0.076 rows=58 loops=1)

  • Output: sources_2.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
41. 0.104 13,397.892 ↑ 7,441.5 596 1

Subquery Scan on items_6 (cost=2,894,955.99..3,039,098.79 rows=4,435,163 width=4) (actual time=13,397.561..13,397.892 rows=596 loops=1)

  • Output: items_6.ticket_id
  • Buffers: shared hit=9162504
42. 0.152 13,397.788 ↑ 7,441.5 596 1

Unique (cost=2,894,955.99..2,994,747.16 rows=4,435,163 width=1,092) (actual time=13,397.559..13,397.788 rows=596 loops=1)

  • Output: items_7.id, items_7.type, items_7.ticket_id, items_7.author_type, items_7.author_id, items_7.body, items_7.created_at, items_7.updated_at
  • Buffers: shared hit=9162504
43. 4.816 13,397.636 ↑ 7,441.5 596 1

Sort (cost=2,894,955.99..2,906,043.90 rows=4,435,163 width=1,092) (actual time=13,397.559..13,397.636 rows=596 loops=1)

  • Output: items_7.id, items_7.type, items_7.ticket_id, items_7.author_type, items_7.author_id, items_7.body, items_7.created_at, items_7.updated_at
  • Sort Key: items_7.id, items_7.type, items_7.ticket_id, items_7.author_type, items_7.author_id, items_7.body, items_7.created_at, items_7.updated_at
  • Sort Method: quicksort Memory: 186kB
  • Buffers: shared hit=9162504
44. 0.076 13,392.820 ↑ 7,441.5 596 1

Append (cost=47,346.81..1,162,243.17 rows=4,435,163 width=1,092) (actual time=6,363.201..13,392.820 rows=596 loops=1)

  • Buffers: shared hit=9162504
45. 485.018 7,357.365 ↑ 5,801.0 596 1

Hash Semi Join (cost=47,346.81..668,630.66 rows=3,457,397 width=205) (actual time=6,363.200..7,357.365 rows=596 loops=1)

  • Output: items_7.id, items_7.type, items_7.ticket_id, items_7.author_type, items_7.author_id, items_7.body, items_7.created_at, items_7.updated_at
  • Hash Cond: (items_7.author_id = social_profiles_1.id)
  • Buffers: shared hit=3852385
46. 2,013.594 6,694.794 ↓ 1.3 4,532,978 1

Hash Semi Join (cost=15.49..573,756.20 rows=3,458,896 width=205) (actual time=0.129..6,694.794 rows=4,532,978 loops=1)

  • Output: items_7.id, items_7.type, items_7.ticket_id, items_7.author_type, items_7.author_id, items_7.body, items_7.created_at, items_7.updated_at
  • Hash Cond: (items_7.source_id = sources_3.id)
  • Buffers: shared hit=3826693
47. 4,681.124 4,681.124 ↓ 1.1 4,532,978 1

Index Scan using test_items_authors_social_profile on public.items items_7 (cost=0.43..524,885.03 rows=3,952,723 width=209) (actual time=0.040..4,681.124 rows=4,532,978 loops=1)

  • Output: items_7.id, items_7.ticket_id, items_7.source_id, items_7.author_id, items_7.external_id, items_7.body, items_7.created_at, items_7.updated_at, items_7.type, items_7.last_read_at, items_7.author_type, items_7.token, items_7.subject, items_7.external_date, items_7.satisfaction, items_7.vote, items_7.social_feedback, items_7.parent_external_id, items_7.can_reply, items_7.deleted_flag, items_7.job_id, items_7.enrichments, items_7.tags, items_7.response_template_id, items_7.retweet_of, items_7.ancestry, items_7.is_mention, items_7.originator_message_id, items_7.message_type, items_7.tagged_at, items_7.metadata, items_7.client_reply_id, items_7.selected_reply_id, items_7.uuid, items_7.switched_private, items_7.external_api_id
  • Index Cond: ((items_7.type)::text = 'Message'::text)
  • Buffers: shared hit=3826635
48. 0.015 0.076 ↑ 1.0 58 1

Hash (cost=14.34..14.34 rows=58 width=4) (actual time=0.076..0.076 rows=58 loops=1)

  • Output: sources_3.id
  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
49. 0.061 0.061 ↑ 1.0 58 1

Index Only Scan using index_sources_on_id_and_workspace_id on public.sources sources_3 (cost=0.27..14.34 rows=58 width=4) (actual time=0.008..0.061 rows=58 loops=1)

  • Output: sources_3.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
50. 0.110 177.553 ↑ 3,698.6 273 1

Hash (cost=34,709.68..34,709.68 rows=1,009,731 width=4) (actual time=177.553..177.553 rows=273 loops=1)

  • Output: social_profiles_1.id
  • Buckets: 1048576 Batches: 1 Memory Usage: 8202kB
  • Buffers: shared hit=25692
51. 0.000 177.443 ↑ 3,698.6 273 1

Nested Loop (cost=34,689.60..34,709.68 rows=1,009,731 width=4) (actual time=176.085..177.443 rows=273 loops=1)

  • Output: social_profiles_1.id
  • Buffers: shared hit=25692
52. 0.181 176.124 ↓ 7.0 273 1

HashAggregate (cost=34,689.17..34,689.56 rows=39 width=15) (actual time=176.066..176.124 rows=273 loops=1)

  • Output: client_users_4.id, client_users_5.id, custom_field_values_2.binded_key
  • Group Key: client_users_4.id
  • Buffers: shared hit=24597
53. 7.011 175.943 ↓ 7.0 273 1

Gather (cost=9,247.95..34,689.07 rows=39 width=15) (actual time=6.939..175.943 rows=273 loops=1)

  • Output: client_users_4.id, client_users_5.id, custom_field_values_2.binded_key
  • Workers Planned: 3
  • Workers Launched: 3
  • Buffers: shared hit=24597
54. 115.687 168.932 ↓ 5.2 68 4 / 4

Hash Semi Join (cost=8,247.95..33,685.17 rows=13 width=15) (actual time=51.110..168.932 rows=68 loops=4)

  • Output: client_users_4.id, client_users_5.id, custom_field_values_2.binded_key
  • Hash Cond: (client_users_4.id = client_users_5.id)
  • Buffers: shared hit=23802
  • Worker 0: actual time=34.811..167.902 rows=84 loops=1
  • Buffers: shared hit=6568
  • Worker 1: actual time=122.387..166.064 rows=49 loops=1
  • Buffers: shared hit=3792
  • Worker 2: actual time=40.981..167.937 rows=64 loops=1
  • Buffers: shared hit=5174
55. 49.288 49.288 ↑ 1.3 331,571 4 / 4

Parallel Seq Scan on public.client_users client_users_4 (cost=0.00..24,329.26 rows=422,026 width=4) (actual time=0.011..49.288 rows=331,571 loops=4)

  • Output: client_users_4.id, client_users_4.created_at, client_users_4.updated_at, client_users_4.terms_of_service, client_users_4.client_code, client_users_4.pool, client_users_4.email, client_users_4.unconfirmed_email, client_users_4.confirmation_token, client_users_4.confirmed_at, client_users_4.confirmation_sent_at, client_users_4.notifier, client_users_4.notification_token, client_users_4.notification_token_type, client_users_4.note, client_users_4.bot_routing, client_users_4.approved_at
  • Buffers: shared hit=20109
  • Worker 0: actual time=0.011..57.923 rows=369392 loops=1
  • Buffers: shared hit=5641
  • Worker 1: actual time=0.013..38.884 rows=183371 loops=1
  • Buffers: shared hit=2865
  • Worker 2: actual time=0.017..55.555 rows=278880 loops=1
  • Buffers: shared hit=4247
56. 0.116 3.957 ↑ 2,396.1 273 4 / 4

Hash (cost=71.20..71.20 rows=654,140 width=11) (actual time=3.957..3.957 rows=273 loops=4)

  • Output: client_users_5.id, custom_field_values_2.binded_key
  • Buckets: 1048576 Batches: 1 Memory Usage: 8204kB
  • Buffers: shared hit=3654
  • Worker 0: actual time=3.980..3.980 rows=273 loops=1
  • Buffers: shared hit=914
  • Worker 1: actual time=4.593..4.593 rows=273 loops=1
  • Buffers: shared hit=914
  • Worker 2: actual time=5.871..5.871 rows=273 loops=1
  • Buffers: shared hit=914
57. 0.213 3.841 ↑ 2,396.1 273 4 / 4

Nested Loop (cost=9.31..71.20 rows=654,140 width=11) (actual time=0.906..3.841 rows=273 loops=4)

  • Output: client_users_5.id, custom_field_values_2.binded_key
  • Buffers: shared hit=3654
  • Worker 0: actual time=0.928..3.853 rows=273 loops=1
  • Buffers: shared hit=914
  • Worker 1: actual time=1.071..4.452 rows=273 loops=1
  • Buffers: shared hit=914
  • Worker 2: actual time=1.326..5.728 rows=273 loops=1
  • Buffers: shared hit=914
58. 0.138 0.898 ↓ 7.0 273 4 / 4

HashAggregate (cost=8.87..9.26 rows=39 width=7) (actual time=0.843..0.898 rows=273 loops=4)

  • Output: custom_field_values_2.binded_key
  • Group Key: (custom_field_values_2.binded_key)::integer
  • Buffers: shared hit=295
  • Worker 0: actual time=0.852..0.907 rows=273 loops=1
  • Buffers: shared hit=74
  • Worker 1: actual time=0.990..1.068 rows=273 loops=1
  • Buffers: shared hit=74
  • Worker 2: actual time=1.247..1.308 rows=273 loops=1
  • Buffers: shared hit=74
59. 0.760 0.760 ↓ 7.0 273 4 / 4

Index Only Scan using test_cfv_deleted_null_value_cf_id_binded_key on public.custom_field_values custom_field_values_2 (cost=0.42..8.78 rows=39 width=7) (actual time=0.086..0.760 rows=273 loops=4)

  • Output: custom_field_values_2.binded_key, (custom_field_values_2.binded_key)::integer
  • Index Cond: ((custom_field_values_2.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid) AND (custom_field_values_2.value = ''::text))
  • Heap Fetches: 79
  • Buffers: shared hit=295
  • Worker 0: actual time=0.099..0.777 rows=273 loops=1
  • Buffers: shared hit=74
  • Worker 1: actual time=0.120..0.904 rows=273 loops=1
  • Buffers: shared hit=74
  • Worker 2: actual time=0.094..1.148 rows=273 loops=1
  • Buffers: shared hit=74
60. 2.730 2.730 ↑ 1.0 1 1,092 / 4

Index Only Scan using client_users_pkey on public.client_users client_users_5 (cost=0.43..1.58 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=1,092)

  • Output: client_users_5.id
  • Index Cond: (client_users_5.id = (custom_field_values_2.binded_key)::integer)
  • Heap Fetches: 15
  • Buffers: shared hit=3359
  • Worker 0: actual time=0.010..0.010 rows=1 loops=273
  • Buffers: shared hit=840
  • Worker 1: actual time=0.012..0.012 rows=1 loops=273
  • Buffers: shared hit=840
  • Worker 2: actual time=0.015..0.015 rows=1 loops=273
  • Buffers: shared hit=840
61. 1.365 1.365 ↑ 2.0 1 273

Index Scan using index_social_profiles_on_client_user_id on public.social_profiles social_profiles_1 (cost=0.43..0.50 rows=2 width=8) (actual time=0.004..0.005 rows=1 loops=273)

  • Output: social_profiles_1.client_user_id, social_profiles_1.id
  • Index Cond: (social_profiles_1.client_user_id = client_users_5.id)
  • Buffers: shared hit=1095
62. 9.439 6,035.379 ↓ 0.0 0 1

Nested Loop Semi Join (cost=25.64..449,260.88 rows=977,766 width=205) (actual time=6,035.379..6,035.379 rows=0 loops=1)

  • Output: items_8.id, items_8.type, items_8.ticket_id, items_8.author_type, items_8.author_id, items_8.body, items_8.created_at, items_8.updated_at
  • Buffers: shared hit=5310119
63. 620.755 2,191.835 ↓ 1.3 1,278,035 1

Hash Semi Join (cost=15.49..416,238.56 rows=978,190 width=205) (actual time=0.125..2,191.835 rows=1,278,035 loops=1)

  • Output: items_8.id, items_8.type, items_8.ticket_id, items_8.author_type, items_8.author_id, items_8.body, items_8.created_at, items_8.updated_at
  • Hash Cond: (items_8.source_id = sources_4.id)
  • Buffers: shared hit=1254169
64. 1,570.998 1,570.998 ↓ 1.1 1,278,035 1

Index Scan using test_items_authors_client_user on public.items items_8 (cost=0.43..402,406.79 rows=1,117,846 width=209) (actual time=0.022..1,570.998 rows=1,278,035 loops=1)

  • Output: items_8.id, items_8.ticket_id, items_8.source_id, items_8.author_id, items_8.external_id, items_8.body, items_8.created_at, items_8.updated_at, items_8.type, items_8.last_read_at, items_8.author_type, items_8.token, items_8.subject, items_8.external_date, items_8.satisfaction, items_8.vote, items_8.social_feedback, items_8.parent_external_id, items_8.can_reply, items_8.deleted_flag, items_8.job_id, items_8.enrichments, items_8.tags, items_8.response_template_id, items_8.retweet_of, items_8.ancestry, items_8.is_mention, items_8.originator_message_id, items_8.message_type, items_8.tagged_at, items_8.metadata, items_8.client_reply_id, items_8.selected_reply_id, items_8.uuid, items_8.switched_private, items_8.external_api_id
  • Index Cond: ((items_8.type)::text = 'Message'::text)
  • Buffers: shared hit=1254111
65. 0.006 0.082 ↑ 1.0 58 1

Hash (cost=14.34..14.34 rows=58 width=4) (actual time=0.082..0.082 rows=58 loops=1)

  • Output: sources_4.id
  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
66. 0.076 0.076 ↑ 1.0 58 1

Index Only Scan using index_sources_on_id_and_workspace_id on public.sources sources_4 (cost=0.27..14.34 rows=58 width=4) (actual time=0.007..0.076 rows=58 loops=1)

  • Output: sources_4.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
67. 1,278.027 3,834.105 ↓ 0.0 0 1,278,035

Hash Semi Join (cost=10.16..10.18 rows=1 width=15) (actual time=0.003..0.003 rows=0 loops=1,278,035)

  • Output: client_users_6.id, client_users_7.id, custom_field_values_3.binded_key
  • Hash Cond: (client_users_6.id = client_users_7.id)
  • Buffers: shared hit=4055950
68. 0.008 0.008 ↑ 1.0 1 1

Index Only Scan using client_users_pkey on public.client_users client_users_6 (cost=0.43..0.45 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=1)

  • Output: client_users_6.id
  • Index Cond: (client_users_6.id = items_8.author_id)
  • Heap Fetches: 0
  • Buffers: shared hit=4
69. 0.000 2,556.070 ↓ 0.0 0 1,278,035

Hash (cost=9.72..9.72 rows=1 width=11) (actual time=0.002..0.002 rows=0 loops=1,278,035)

  • Output: client_users_7.id, custom_field_values_3.binded_key
  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=4055946
70. 1,277.805 2,556.070 ↓ 0.0 0 1,278,035

Hash Semi Join (cost=9.69..9.72 rows=1 width=11) (actual time=0.002..0.002 rows=0 loops=1,278,035)

  • Output: client_users_7.id, custom_field_values_3.binded_key
  • Hash Cond: (client_users_7.id = (custom_field_values_3.binded_key)::integer)
  • Buffers: shared hit=4055946
71. 1,278.035 1,278.035 ↑ 1.0 1 1,278,035

Index Only Scan using client_users_pkey on public.client_users client_users_7 (cost=0.43..0.45 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=1,278,035)

  • Output: client_users_7.id
  • Index Cond: (client_users_7.id = items_8.author_id)
  • Heap Fetches: 215136
  • Buffers: shared hit=4055873
72. 0.066 0.230 ↓ 7.0 273 1

Hash (cost=8.78..8.78 rows=39 width=7) (actual time=0.230..0.230 rows=273 loops=1)

  • Output: custom_field_values_3.binded_key
  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
  • Buffers: shared hit=73
73. 0.164 0.164 ↓ 7.0 273 1

Index Only Scan using test_cfv_deleted_null_value_cf_id_binded_key on public.custom_field_values custom_field_values_3 (cost=0.42..8.78 rows=39 width=7) (actual time=0.023..0.164 rows=273 loops=1)

  • Output: custom_field_values_3.binded_key
  • Index Cond: ((custom_field_values_3.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid) AND (custom_field_values_3.value = ''::text))
  • Heap Fetches: 79
  • Buffers: shared hit=73
74. 0.081 33,055.842 ↑ 7,416.7 598 1

Subquery Scan on items_9 (cost=2,900,780.45..3,044,923.25 rows=4,435,163 width=4) (actual time=33,055.507..33,055.842 rows=598 loops=1)

  • Output: items_9.ticket_id
  • Buffers: shared hit=9681378 read=37229
75. 0.141 33,055.761 ↑ 7,416.7 598 1

Unique (cost=2,900,780.45..3,000,571.62 rows=4,435,163 width=1,092) (actual time=33,055.506..33,055.761 rows=598 loops=1)

  • Output: items_10.id, items_10.type, items_10.ticket_id, items_10.author_type, items_10.author_id, items_10.body, items_10.created_at, items_10.updated_at
  • Buffers: shared hit=9681378 read=37229
76. 6.122 33,055.620 ↑ 7,416.7 598 1

Sort (cost=2,900,780.45..2,911,868.36 rows=4,435,163 width=1,092) (actual time=33,055.505..33,055.620 rows=598 loops=1)

  • Output: items_10.id, items_10.type, items_10.ticket_id, items_10.author_type, items_10.author_id, items_10.body, items_10.created_at, items_10.updated_at
  • Sort Key: items_10.id, items_10.type, items_10.ticket_id, items_10.author_type, items_10.author_id, items_10.body, items_10.created_at, items_10.updated_at
  • Sort Method: quicksort Memory: 186kB
  • Buffers: shared hit=9681378 read=37229
77. 0.084 33,049.498 ↑ 7,416.7 598 1

Append (cost=53,106.79..1,168,067.63 rows=4,435,163 width=1,092) (actual time=5,386.536..33,049.498 rows=598 loops=1)

  • Buffers: shared hit=9681378 read=37229
78. 501.369 7,203.496 ↑ 5,781.6 598 1

Hash Semi Join (cost=53,106.79..674,390.64 rows=3,457,397 width=205) (actual time=5,386.534..7,203.496 rows=598 loops=1)

  • Output: items_10.id, items_10.type, items_10.ticket_id, items_10.author_type, items_10.author_id, items_10.body, items_10.created_at, items_10.updated_at
  • Hash Cond: (items_10.author_id = social_profiles_2.id)
  • Buffers: shared hit=3852841
79. 1,984.798 6,514.125 ↓ 1.3 4,532,978 1

Hash Semi Join (cost=15.49..573,756.20 rows=3,458,896 width=205) (actual time=0.988..6,514.125 rows=4,532,978 loops=1)

  • Output: items_10.id, items_10.type, items_10.ticket_id, items_10.author_type, items_10.author_id, items_10.body, items_10.created_at, items_10.updated_at
  • Hash Cond: (items_10.source_id = sources_5.id)
  • Buffers: shared hit=3826693
80. 4,529.246 4,529.246 ↓ 1.1 4,532,978 1

Index Scan using test_items_authors_social_profile on public.items items_10 (cost=0.43..524,885.03 rows=3,952,723 width=209) (actual time=0.027..4,529.246 rows=4,532,978 loops=1)

  • Output: items_10.id, items_10.ticket_id, items_10.source_id, items_10.author_id, items_10.external_id, items_10.body, items_10.created_at, items_10.updated_at, items_10.type, items_10.last_read_at, items_10.author_type, items_10.token, items_10.subject, items_10.external_date, items_10.satisfaction, items_10.vote, items_10.social_feedback, items_10.parent_external_id, items_10.can_reply, items_10.deleted_flag, items_10.job_id, items_10.enrichments, items_10.tags, items_10.response_template_id, items_10.retweet_of, items_10.ancestry, items_10.is_mention, items_10.originator_message_id, items_10.message_type, items_10.tagged_at, items_10.metadata, items_10.client_reply_id, items_10.selected_reply_id, items_10.uuid, items_10.switched_private, items_10.external_api_id
  • Index Cond: ((items_10.type)::text = 'Message'::text)
  • Buffers: shared hit=3826635
81. 0.013 0.081 ↑ 1.0 58 1

Hash (cost=14.34..14.34 rows=58 width=4) (actual time=0.081..0.081 rows=58 loops=1)

  • Output: sources_5.id
  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
82. 0.068 0.068 ↑ 1.0 58 1

Index Only Scan using index_sources_on_id_and_workspace_id on public.sources sources_5 (cost=0.27..14.34 rows=58 width=4) (actual time=0.008..0.068 rows=58 loops=1)

  • Output: sources_5.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
83. 0.951 188.002 ↑ 3,685.1 274 1

Hash (cost=40,469.66..40,469.66 rows=1,009,731 width=4) (actual time=188.002..188.002 rows=274 loops=1)

  • Output: social_profiles_2.id
  • Buckets: 1048576 Batches: 1 Memory Usage: 8202kB
  • Buffers: shared hit=26148
84. 0.117 187.051 ↑ 3,685.1 274 1

Nested Loop (cost=38,966.38..40,469.66 rows=1,009,731 width=4) (actual time=185.799..187.051 rows=274 loops=1)

  • Output: social_profiles_2.id
  • Buffers: shared hit=26148
85. 0.491 185.838 ↑ 10.4 274 1

HashAggregate (cost=38,965.95..38,994.55 rows=2,860 width=15) (actual time=185.782..185.838 rows=274 loops=1)

  • Output: client_users_8.id, client_users_9.id, custom_field_values_4.binded_key
  • Group Key: client_users_8.id
  • Buffers: shared hit=25049
86. 8.632 185.347 ↑ 10.4 274 1

Gather (cost=13,225.45..38,958.80 rows=2,860 width=15) (actual time=15.441..185.347 rows=274 loops=1)

  • Output: client_users_8.id, client_users_9.id, custom_field_values_4.binded_key
  • Workers Planned: 3
  • Workers Launched: 3
  • Buffers: shared hit=25049
87. 127.738 176.715 ↑ 13.6 68 4 / 4

Hash Semi Join (cost=12,225.45..37,672.80 rows=923 width=15) (actual time=71.702..176.715 rows=68 loops=4)

  • Output: client_users_8.id, client_users_9.id, custom_field_values_4.binded_key
  • Hash Cond: (client_users_8.id = client_users_9.id)
  • Buffers: shared hit=24263
  • Worker 0: actual time=100.470..175.350 rows=57 loops=1
  • Buffers: shared hit=3738
  • Worker 1: actual time=48.464..175.692 rows=57 loops=1
  • Buffers: shared hit=5901
  • Worker 2: actual time=125.920..175.536 rows=67 loops=1
  • Buffers: shared hit=6164
88. 44.263 44.263 ↑ 1.3 331,571 4 / 4

Parallel Seq Scan on public.client_users client_users_8 (cost=0.00..24,329.26 rows=422,026 width=4) (actual time=0.012..44.263 rows=331,571 loops=4)

  • Output: client_users_8.id, client_users_8.created_at, client_users_8.updated_at, client_users_8.terms_of_service, client_users_8.client_code, client_users_8.pool, client_users_8.email, client_users_8.unconfirmed_email, client_users_8.confirmation_token, client_users_8.confirmed_at, client_users_8.confirmation_sent_at, client_users_8.notifier, client_users_8.notification_token, client_users_8.notification_token_type, client_users_8.note, client_users_8.bot_routing, client_users_8.approved_at
  • Buffers: shared hit=20109
  • Worker 0: actual time=0.014..27.583 rows=180513 loops=1
  • Buffers: shared hit=2695
  • Worker 1: actual time=0.012..50.425 rows=309373 loops=1
  • Buffers: shared hit=4858
  • Worker 2: actual time=0.016..53.628 rows=332447 loops=1
  • Buffers: shared hit=5121
89. 0.298 4.714 ↑ 2,387.4 274 4 / 4

Hash (cost=4,048.70..4,048.70 rows=654,140 width=11) (actual time=4.714..4.714 rows=274 loops=4)

  • Output: client_users_9.id, custom_field_values_4.binded_key
  • Buckets: 1048576 Batches: 1 Memory Usage: 8204kB
  • Buffers: shared hit=4115
  • Worker 0: actual time=4.711..4.711 rows=274 loops=1
  • Buffers: shared hit=1030
  • Worker 1: actual time=5.116..5.116 rows=274 loops=1
  • Buffers: shared hit=1030
  • Worker 2: actual time=5.757..5.757 rows=274 loops=1
  • Buffers: shared hit=1030
90. 0.326 4.416 ↑ 2,387.4 274 4 / 4

Nested Loop (cost=454.16..4,048.70 rows=654,140 width=11) (actual time=1.979..4.416 rows=274 loops=4)

  • Output: client_users_9.id, custom_field_values_4.binded_key
  • Buffers: shared hit=4115
  • Worker 0: actual time=1.899..4.575 rows=274 loops=1
  • Buffers: shared hit=1030
  • Worker 1: actual time=2.272..4.988 rows=274 loops=1
  • Buffers: shared hit=1030
  • Worker 2: actual time=2.231..5.623 rows=274 loops=1
  • Buffers: shared hit=1030
91. 0.244 1.898 ↑ 10.4 274 4 / 4

HashAggregate (cost=453.72..482.16 rows=2,844 width=7) (actual time=1.827..1.898 rows=274 loops=4)

  • Output: custom_field_values_4.binded_key
  • Group Key: (custom_field_values_4.binded_key)::integer
  • Buffers: shared hit=744
  • Worker 0: actual time=1.823..1.889 rows=274 loops=1
  • Buffers: shared hit=187
  • Worker 1: actual time=2.196..2.275 rows=274 loops=1
  • Buffers: shared hit=187
  • Worker 2: actual time=2.128..2.232 rows=274 loops=1
  • Buffers: shared hit=187
92. 1.654 1.654 ↑ 10.4 274 4 / 4

Index Only Scan using test_cfv_deleted_null_value_cf_id_binded_key on public.custom_field_values custom_field_values_4 (cost=0.42..446.57 rows=2,860 width=7) (actual time=0.176..1.654 rows=274 loops=4)

  • Output: custom_field_values_4.binded_key, (custom_field_values_4.binded_key)::integer
  • Index Cond: (custom_field_values_4.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid)
  • Filter: (custom_field_values_4.value <> ALL ('{Large,SME,E&O}'::text[]))
  • Rows Removed by Filter: 1374
  • Heap Fetches: 190
  • Buffers: shared hit=744
  • Worker 0: actual time=0.145..1.745 rows=274 loops=1
  • Buffers: shared hit=187
  • Worker 1: actual time=0.140..2.114 rows=274 loops=1
  • Buffers: shared hit=187
  • Worker 2: actual time=0.173..2.017 rows=274 loops=1
  • Buffers: shared hit=187
93. 2.192 2.192 ↑ 1.0 1 1,096 / 4

Index Only Scan using client_users_pkey on public.client_users client_users_9 (cost=0.43..1.24 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=1,096)

  • Output: client_users_9.id
  • Index Cond: (client_users_9.id = (custom_field_values_4.binded_key)::integer)
  • Heap Fetches: 15
  • Buffers: shared hit=3371
  • Worker 0: actual time=0.009..0.009 rows=1 loops=274
  • Buffers: shared hit=843
  • Worker 1: actual time=0.009..0.010 rows=1 loops=274
  • Buffers: shared hit=843
  • Worker 2: actual time=0.012..0.012 rows=1 loops=274
  • Buffers: shared hit=843
94. 1.096 1.096 ↑ 2.0 1 274

Index Scan using index_social_profiles_on_client_user_id on public.social_profiles social_profiles_2 (cost=0.43..0.50 rows=2 width=8) (actual time=0.004..0.004 rows=1 loops=274)

  • Output: social_profiles_2.client_user_id, social_profiles_2.id
  • Index Cond: (social_profiles_2.client_user_id = client_users_9.id)
  • Buffers: shared hit=1099
95. 350.491 25,845.918 ↓ 0.0 0 1

Nested Loop Semi Join (cost=90.12..449,325.36 rows=977,766 width=205) (actual time=25,845.918..25,845.918 rows=0 loops=1)

  • Output: items_11.id, items_11.type, items_11.ticket_id, items_11.author_type, items_11.author_id, items_11.body, items_11.created_at, items_11.updated_at
  • Buffers: shared hit=5828537 read=37229
96. 756.868 3,768.832 ↓ 1.3 1,278,035 1

Hash Semi Join (cost=15.49..416,238.56 rows=978,190 width=205) (actual time=1.032..3,768.832 rows=1,278,035 loops=1)

  • Output: items_11.id, items_11.type, items_11.ticket_id, items_11.author_type, items_11.author_id, items_11.body, items_11.created_at, items_11.updated_at
  • Hash Cond: (items_11.source_id = sources_6.id)
  • Buffers: shared hit=1218892 read=35277
97. 3,011.635 3,011.635 ↓ 1.1 1,278,035 1

Index Scan using test_items_authors_client_user on public.items items_11 (cost=0.43..402,406.79 rows=1,117,846 width=209) (actual time=0.023..3,011.635 rows=1,278,035 loops=1)

  • Output: items_11.id, items_11.ticket_id, items_11.source_id, items_11.author_id, items_11.external_id, items_11.body, items_11.created_at, items_11.updated_at, items_11.type, items_11.last_read_at, items_11.author_type, items_11.token, items_11.subject, items_11.external_date, items_11.satisfaction, items_11.vote, items_11.social_feedback, items_11.parent_external_id, items_11.can_reply, items_11.deleted_flag, items_11.job_id, items_11.enrichments, items_11.tags, items_11.response_template_id, items_11.retweet_of, items_11.ancestry, items_11.is_mention, items_11.originator_message_id, items_11.message_type, items_11.tagged_at, items_11.metadata, items_11.client_reply_id, items_11.selected_reply_id, items_11.uuid, items_11.switched_private, items_11.external_api_id
  • Index Cond: ((items_11.type)::text = 'Message'::text)
  • Buffers: shared hit=1218834 read=35277
98. 0.271 0.329 ↑ 1.0 58 1

Hash (cost=14.34..14.34 rows=58 width=4) (actual time=0.329..0.329 rows=58 loops=1)

  • Output: sources_6.id
  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
99. 0.058 0.058 ↑ 1.0 58 1

Index Only Scan using index_sources_on_id_and_workspace_id on public.sources sources_6 (cost=0.27..14.34 rows=58 width=4) (actual time=0.009..0.058 rows=58 loops=1)

  • Output: sources_6.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
100. 2,556.060 21,726.595 ↓ 0.0 0 1,278,035

Hash Semi Join (cost=74.63..74.65 rows=1 width=15) (actual time=0.017..0.017 rows=0 loops=1,278,035)

  • Output: client_users_10.id, client_users_11.id, custom_field_values_5.binded_key
  • Hash Cond: (client_users_10.id = client_users_11.id)
  • Buffers: shared hit=4609645 read=1952
101. 0.010 0.010 ↑ 1.0 1 1

Index Only Scan using client_users_pkey on public.client_users client_users_10 (cost=0.43..0.45 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=1)

  • Output: client_users_10.id
  • Index Cond: (client_users_10.id = items_11.author_id)
  • Heap Fetches: 0
  • Buffers: shared hit=4
102. 0.000 19,170.525 ↓ 0.0 0 1,278,035

Hash (cost=74.19..74.19 rows=1 width=11) (actual time=0.015..0.015 rows=0 loops=1,278,035)

  • Output: client_users_11.id, custom_field_values_5.binded_key
  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=4609641 read=1952
103. 1,278.031 19,170.525 ↓ 0.0 0 1,278,035

Hash Semi Join (cost=74.17..74.19 rows=1 width=11) (actual time=0.015..0.015 rows=0 loops=1,278,035)

  • Output: client_users_11.id, custom_field_values_5.binded_key
  • Hash Cond: (client_users_11.id = (custom_field_values_5.binded_key)::integer)
  • Buffers: shared hit=4609641 read=1952
104. 0.004 0.004 ↑ 1.0 1 1

Index Only Scan using client_users_pkey on public.client_users client_users_11 (cost=0.43..0.45 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1)

  • Output: client_users_11.id
  • Index Cond: (client_users_11.id = items_11.author_id)
  • Heap Fetches: 0
  • Buffers: shared hit=4
105. 1,278.035 17,892.490 ↓ 0.0 0 1,278,035

Hash (cost=73.56..73.56 rows=14 width=7) (actual time=0.014..0.014 rows=0 loops=1,278,035)

  • Output: custom_field_values_5.binded_key
  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=4609637 read=1952
106. 0.000 16,614.455 ↓ 0.0 0 1,278,035

Bitmap Heap Scan on public.custom_field_values custom_field_values_5 (cost=72.13..73.56 rows=14 width=7) (actual time=0.013..0.013 rows=0 loops=1,278,035)

  • Output: custom_field_values_5.binded_key
  • Recheck Cond: (((custom_field_values_5.binded_key)::integer = items_11.author_id) AND (custom_field_values_5.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid))
  • Filter: ((custom_field_values_5.deleted_at IS NULL) AND (custom_field_values_5.value <> ALL ('{Large,SME,E&O}'::text[])))
  • Buffers: shared hit=4609637 read=1952
107. 348.130 16,614.455 ↓ 0.0 0 1,278,035

BitmapAnd (cost=72.13..72.13 rows=14 width=0) (actual time=0.013..0.013 rows=0 loops=1,278,035)

  • Buffers: shared hit=4609637 read=1952
108. 2,556.070 2,556.070 ↓ 0.0 0 1,278,035

Bitmap Index Scan on test_cfv_binded_key_integer (cost=0.00..28.36 rows=3,725 width=0) (actual time=0.002..0.002 rows=0 loops=1,278,035)

  • Index Cond: ((custom_field_values_5.binded_key)::integer = items_11.author_id)
  • Buffers: shared hit=3836238 read=1952
109. 13,710.255 13,710.255 ↑ 1.7 1,648 70,309

Bitmap Index Scan on test_cfv_cf_id_and_value (cost=0.00..42.80 rows=2,863 width=0) (actual time=0.195..0.195 rows=1,648 loops=70,309)

  • Index Cond: (custom_field_values_5.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid)
  • Buffers: shared hit=773399
110. 0.981 19,385.894 ↑ 516.7 8,583 1

Subquery Scan on items_12 (cost=2,894,881.94..3,039,024.74 rows=4,435,163 width=4) (actual time=19,381.932..19,385.894 rows=8,583 loops=1)

  • Output: items_12.ticket_id
  • Buffers: shared hit=9077991 read=141600
111. 1.662 19,384.913 ↑ 516.7 8,583 1

Unique (cost=2,894,881.94..2,994,673.11 rows=4,435,163 width=1,092) (actual time=19,381.931..19,384.913 rows=8,583 loops=1)

  • Output: items_13.id, items_13.type, items_13.ticket_id, items_13.author_type, items_13.author_id, items_13.body, items_13.created_at, items_13.updated_at
  • Buffers: shared hit=9077991 read=141600
112. 7.699 19,383.251 ↑ 516.7 8,583 1

Sort (cost=2,894,881.94..2,905,969.85 rows=4,435,163 width=1,092) (actual time=19,381.930..19,383.251 rows=8,583 loops=1)

  • Output: items_13.id, items_13.type, items_13.ticket_id, items_13.author_type, items_13.author_id, items_13.body, items_13.created_at, items_13.updated_at
  • Sort Key: items_13.id, items_13.type, items_13.ticket_id, items_13.author_type, items_13.author_id, items_13.body, items_13.created_at, items_13.updated_at
  • Sort Method: quicksort Memory: 2229kB
  • Buffers: shared hit=9077991 read=141600
113. 0.904 19,375.552 ↑ 516.7 8,583 1

Append (cost=47,278.00..1,162,169.12 rows=4,435,163 width=1,092) (actual time=11,068.524..19,375.552 rows=8,583 loops=1)

  • Buffers: shared hit=9077991 read=141600
114. 638.342 11,842.275 ↑ 402.8 8,583 1

Hash Semi Join (cost=47,278.00..668,561.85 rows=3,457,397 width=205) (actual time=11,068.522..11,842.275 rows=8,583 loops=1)

  • Output: items_13.id, items_13.type, items_13.ticket_id, items_13.author_type, items_13.author_id, items_13.body, items_13.created_at, items_13.updated_at
  • Hash Cond: (items_13.author_id = social_profiles_3.id)
  • Buffers: shared hit=3780113 read=128385
115. 2,292.360 10,931.192 ↓ 1.3 4,532,978 1

Hash Semi Join (cost=15.49..573,756.20 rows=3,458,896 width=205) (actual time=0.397..10,931.192 rows=4,532,978 loops=1)

  • Output: items_13.id, items_13.type, items_13.ticket_id, items_13.author_type, items_13.author_id, items_13.body, items_13.created_at, items_13.updated_at
  • Hash Cond: (items_13.source_id = sources_7.id)
  • Buffers: shared hit=3713735 read=112958
116. 8,638.732 8,638.732 ↓ 1.1 4,532,978 1

Index Scan using test_items_authors_social_profile on public.items items_13 (cost=0.43..524,885.03 rows=3,952,723 width=209) (actual time=0.043..8,638.732 rows=4,532,978 loops=1)

  • Output: items_13.id, items_13.ticket_id, items_13.source_id, items_13.author_id, items_13.external_id, items_13.body, items_13.created_at, items_13.updated_at, items_13.type, items_13.last_read_at, items_13.author_type, items_13.token, items_13.subject, items_13.external_date, items_13.satisfaction, items_13.vote, items_13.social_feedback, items_13.parent_external_id, items_13.can_reply, items_13.deleted_flag, items_13.job_id, items_13.enrichments, items_13.tags, items_13.response_template_id, items_13.retweet_of, items_13.ancestry, items_13.is_mention, items_13.originator_message_id, items_13.message_type, items_13.tagged_at, items_13.metadata, items_13.client_reply_id, items_13.selected_reply_id, items_13.uuid, items_13.switched_private, items_13.external_api_id
  • Index Cond: ((items_13.type)::text = 'Message'::text)
  • Buffers: shared hit=3713677 read=112958
117. 0.010 0.100 ↑ 1.0 58 1

Hash (cost=14.34..14.34 rows=58 width=4) (actual time=0.100..0.100 rows=58 loops=1)

  • Output: sources_7.id
  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
118. 0.090 0.090 ↑ 1.0 58 1

Index Only Scan using index_sources_on_id_and_workspace_id on public.sources sources_7 (cost=0.27..14.34 rows=58 width=4) (actual time=0.012..0.090 rows=58 loops=1)

  • Output: sources_7.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
119. 1.196 272.741 ↑ 295.0 3,423 1

Hash (cost=34,640.87..34,640.87 rows=1,009,731 width=4) (actual time=272.741..272.741 rows=3,423 loops=1)

  • Output: social_profiles_3.id
  • Buckets: 1048576 Batches: 1 Memory Usage: 8313kB
  • Buffers: shared hit=66378 read=15427
120. 1.034 271.545 ↑ 295.0 3,423 1

Nested Loop (cost=34,636.04..34,640.87 rows=1,009,731 width=4) (actual time=255.612..271.545 rows=3,423 loops=1)

  • Output: social_profiles_3.id
  • Buffers: shared hit=66378 read=15427
121. 3.047 256.819 ↓ 342.3 3,423 1

HashAggregate (cost=34,635.61..34,635.71 rows=10 width=15) (actual time=255.592..256.819 rows=3,423 loops=1)

  • Output: client_users_12.id, client_users_13.id, custom_field_values_6.binded_key
  • Group Key: client_users_12.id
  • Buffers: shared hit=52707 read=15386
122. 9.667 253.772 ↓ 342.3 3,423 1

Gather (cost=9,197.47..34,635.58 rows=10 width=15) (actual time=68.987..253.772 rows=3,423 loops=1)

  • Output: client_users_12.id, client_users_13.id, custom_field_values_6.binded_key
  • Workers Planned: 3
  • Workers Launched: 3
  • Buffers: shared hit=52707 read=15386
123. 125.907 244.105 ↓ 285.3 856 4 / 4

Hash Semi Join (cost=8,197.47..33,634.58 rows=3 width=15) (actual time=74.506..244.105 rows=856 loops=4)

  • Output: client_users_12.id, client_users_13.id, custom_field_values_6.binded_key
  • Hash Cond: (client_users_12.id = client_users_13.id)
  • Buffers: shared hit=51912 read=15386
  • Worker 0: actual time=78.349..243.107 rows=829 loops=1
  • Buffers: shared hit=13011 read=3427
  • Worker 1: actual time=76.413..241.331 rows=820 loops=1
  • Buffers: shared hit=12727 read=3301
  • Worker 2: actual time=76.781..242.899 rows=756 loops=1
  • Buffers: shared hit=12957 read=3675
124. 86.682 86.682 ↑ 1.3 331,571 4 / 4

Parallel Seq Scan on public.client_users client_users_12 (cost=0.00..24,329.26 rows=422,026 width=4) (actual time=0.037..86.682 rows=331,571 loops=4)

  • Output: client_users_12.id, client_users_12.created_at, client_users_12.updated_at, client_users_12.terms_of_service, client_users_12.client_code, client_users_12.pool, client_users_12.email, client_users_12.unconfirmed_email, client_users_12.confirmation_token, client_users_12.confirmed_at, client_users_12.confirmation_sent_at, client_users_12.notifier, client_users_12.notification_token, client_users_12.notification_token_type, client_users_12.note, client_users_12.bot_routing, client_users_12.approved_at
  • Buffers: shared hit=5109 read=15000
  • Worker 0: actual time=0.038..87.997 rows=304793 loops=1
  • Buffers: shared hit=1210 read=3427
  • Worker 1: actual time=0.051..88.536 rows=272256 loops=1
  • Buffers: shared hit=1199 read=3028
  • Worker 2: actual time=0.044..86.398 rows=318053 loops=1
  • Buffers: shared hit=1156 read=3675
125. 1.454 31.516 ↑ 191.1 3,423 4 / 4

Hash (cost=20.72..20.72 rows=654,140 width=11) (actual time=31.516..31.516 rows=3,423 loops=4)

  • Output: client_users_13.id, custom_field_values_6.binded_key
  • Buckets: 1048576 Batches: 1 Memory Usage: 8340kB
  • Buffers: shared hit=46764 read=386
  • Worker 0: actual time=25.956..25.956 rows=3423 loops=1
  • Buffers: shared hit=11788
  • Worker 1: actual time=57.186..57.186 rows=3423 loops=1
  • Buffers: shared hit=11515 read=273
  • Worker 2: actual time=24.651..24.651 rows=3423 loops=1
  • Buffers: shared hit=11788
126. 0.399 30.062 ↑ 191.1 3,423 4 / 4

Nested Loop (cost=4.36..20.72 rows=654,140 width=11) (actual time=11.500..30.062 rows=3,423 loops=4)

  • Output: client_users_13.id, custom_field_values_6.binded_key
  • Buffers: shared hit=46764 read=386
  • Worker 0: actual time=7.594..24.748 rows=3423 loops=1
  • Buffers: shared hit=11788
  • Worker 1: actual time=25.761..54.780 rows=3423 loops=1
  • Buffers: shared hit=11515 read=273
  • Worker 2: actual time=6.701..23.484 rows=3423 loops=1
  • Buffers: shared hit=11788
127. 2.457 12.548 ↓ 342.3 3,423 4 / 4

HashAggregate (cost=3.92..4.02 rows=10 width=7) (actual time=11.423..12.548 rows=3,423 loops=4)

  • Output: custom_field_values_6.binded_key
  • Group Key: (custom_field_values_6.binded_key)::integer
  • Buffers: shared hit=3412 read=343
  • Worker 0: actual time=7.518..8.549 rows=3423 loops=1
  • Buffers: shared hit=939
  • Worker 1: actual time=25.622..27.252 rows=3423 loops=1
  • Buffers: shared hit=666 read=273
  • Worker 2: actual time=6.624..7.719 rows=3423 loops=1
  • Buffers: shared hit=939
128. 10.091 10.091 ↓ 342.3 3,423 4 / 4

Index Only Scan using test_cfv_deleted_null_value_cf_id_binded_key on public.custom_field_values custom_field_values_6 (cost=0.42..3.90 rows=10 width=7) (actual time=0.094..10.091 rows=3,423 loops=4)

  • Output: custom_field_values_6.binded_key, (custom_field_values_6.binded_key)::integer
  • Index Cond: ((custom_field_values_6.custom_field_id = '520d1832-0834-4091-bf56-d56f5d6aa389'::uuid) AND (custom_field_values_6.value = 'Business TRE'::text))
  • Heap Fetches: 1419
  • Buffers: shared hit=3412 read=343
  • Worker 0: actual time=0.111..6.616 rows=3423 loops=1
  • Buffers: shared hit=939
  • Worker 1: actual time=0.130..23.047 rows=3423 loops=1
  • Buffers: shared hit=666 read=273
  • Worker 2: actual time=0.098..5.679 rows=3423 loops=1
  • Buffers: shared hit=939
129. 17.115 17.115 ↑ 1.0 1 13,692 / 4

Index Only Scan using client_users_pkey on public.client_users client_users_13 (cost=0.43..1.66 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=13,692)

  • Output: client_users_13.id
  • Index Cond: (client_users_13.id = (custom_field_values_6.binded_key)::integer)
  • Heap Fetches: 556
  • Buffers: shared hit=43352 read=43
  • Worker 0: actual time=0.004..0.004 rows=1 loops=3423
  • Buffers: shared hit=10849
  • Worker 1: actual time=0.007..0.007 rows=1 loops=3423
  • Buffers: shared hit=10849
  • Worker 2: actual time=0.004..0.004 rows=1 loops=3423
  • Buffers: shared hit=10849
130. 13.692 13.692 ↑ 2.0 1 3,423

Index Scan using index_social_profiles_on_client_user_id on public.social_profiles social_profiles_3 (cost=0.43..0.50 rows=2 width=8) (actual time=0.004..0.004 rows=1 loops=3,423)

  • Output: social_profiles_3.client_user_id, social_profiles_3.id
  • Index Cond: (social_profiles_3.client_user_id = client_users_13.id)
  • Buffers: shared hit=13671 read=41
131. 810.652 7,532.373 ↓ 0.0 0 1

Nested Loop Semi Join (cost=20.40..449,255.64 rows=977,766 width=205) (actual time=7,532.373..7,532.373 rows=0 loops=1)

  • Output: items_14.id, items_14.type, items_14.ticket_id, items_14.author_type, items_14.author_id, items_14.body, items_14.created_at, items_14.updated_at
  • Buffers: shared hit=5297878 read=13215
132. 708.514 2,887.616 ↓ 1.3 1,278,035 1

Hash Semi Join (cost=15.49..416,238.56 rows=978,190 width=205) (actual time=0.280..2,887.616 rows=1,278,035 loops=1)

  • Output: items_14.id, items_14.type, items_14.ticket_id, items_14.author_type, items_14.author_id, items_14.body, items_14.created_at, items_14.updated_at
  • Hash Cond: (items_14.source_id = sources_8.id)
  • Buffers: shared hit=1246078 read=8091
133. 2,178.942 2,178.942 ↓ 1.1 1,278,035 1

Index Scan using test_items_authors_client_user on public.items items_14 (cost=0.43..402,406.79 rows=1,117,846 width=209) (actual time=0.096..2,178.942 rows=1,278,035 loops=1)

  • Output: items_14.id, items_14.ticket_id, items_14.source_id, items_14.author_id, items_14.external_id, items_14.body, items_14.created_at, items_14.updated_at, items_14.type, items_14.last_read_at, items_14.author_type, items_14.token, items_14.subject, items_14.external_date, items_14.satisfaction, items_14.vote, items_14.social_feedback, items_14.parent_external_id, items_14.can_reply, items_14.deleted_flag, items_14.job_id, items_14.enrichments, items_14.tags, items_14.response_template_id, items_14.retweet_of, items_14.ancestry, items_14.is_mention, items_14.originator_message_id, items_14.message_type, items_14.tagged_at, items_14.metadata, items_14.client_reply_id, items_14.selected_reply_id, items_14.uuid, items_14.switched_private, items_14.external_api_id
  • Index Cond: ((items_14.type)::text = 'Message'::text)
  • Buffers: shared hit=1246020 read=8091
134. 0.017 0.160 ↑ 1.0 58 1

Hash (cost=14.34..14.34 rows=58 width=4) (actual time=0.160..0.160 rows=58 loops=1)

  • Output: sources_8.id
  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
135. 0.143 0.143 ↑ 1.0 58 1

Index Only Scan using index_sources_on_id_and_workspace_id on public.sources sources_8 (cost=0.27..14.34 rows=58 width=4) (actual time=0.012..0.143 rows=58 loops=1)

  • Output: sources_8.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
136. 1,278.008 3,834.105 ↓ 0.0 0 1,278,035

Hash Semi Join (cost=4.92..4.94 rows=1 width=15) (actual time=0.003..0.003 rows=0 loops=1,278,035)

  • Output: client_users_14.id, client_users_15.id, custom_field_values_7.binded_key
  • Hash Cond: (client_users_14.id = client_users_15.id)
  • Buffers: shared hit=4051800 read=5124
137. 0.027 0.027 ↑ 1.0 1 1

Index Only Scan using client_users_pkey on public.client_users client_users_14 (cost=0.43..0.45 rows=1 width=4) (actual time=0.027..0.027 rows=1 loops=1)

  • Output: client_users_14.id
  • Index Cond: (client_users_14.id = items_14.author_id)
  • Heap Fetches: 0
  • Buffers: shared hit=3 read=1
138. 0.000 2,556.070 ↓ 0.0 0 1,278,035

Hash (cost=4.48..4.48 rows=1 width=11) (actual time=0.002..0.002 rows=0 loops=1,278,035)

  • Output: client_users_15.id, custom_field_values_7.binded_key
  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=4051797 read=5123
139. 0.000 2,556.070 ↓ 0.0 0 1,278,035

Hash Semi Join (cost=4.45..4.48 rows=1 width=11) (actual time=0.002..0.002 rows=0 loops=1,278,035)

  • Output: client_users_15.id, custom_field_values_7.binded_key
  • Hash Cond: (client_users_15.id = (custom_field_values_7.binded_key)::integer)
  • Buffers: shared hit=4051797 read=5123
140. 2,556.070 2,556.070 ↑ 1.0 1 1,278,035

Index Only Scan using client_users_pkey on public.client_users client_users_15 (cost=0.43..0.45 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1,278,035)

  • Output: client_users_15.id
  • Index Cond: (client_users_15.id = items_14.author_id)
  • Heap Fetches: 215245
  • Buffers: shared hit=4050859 read=5123
141. 1.630 4.785 ↓ 342.3 3,423 1

Hash (cost=3.90..3.90 rows=10 width=7) (actual time=4.785..4.785 rows=3,423 loops=1)

  • Output: custom_field_values_7.binded_key
  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 166kB
  • Buffers: shared hit=938
142. 3.155 3.155 ↓ 342.3 3,423 1

Index Only Scan using test_cfv_deleted_null_value_cf_id_binded_key on public.custom_field_values custom_field_values_7 (cost=0.42..3.90 rows=10 width=7) (actual time=0.031..3.155 rows=3,423 loops=1)

  • Output: custom_field_values_7.binded_key
  • Index Cond: ((custom_field_values_7.custom_field_id = '520d1832-0834-4091-bf56-d56f5d6aa389'::uuid) AND (custom_field_values_7.value = 'Business TRE'::text))
  • Heap Fetches: 1419
  • Buffers: shared hit=938
143. 0.000 0.048 ↑ 1.0 1 8

Index Only Scan using index_items_on_source_id_and_id on public.items (cost=1.56..2.68 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=8)

  • Output: items.source_id, items.id
  • Index Cond: ((items.source_id = 44) AND (items.id = (SubPlan 1)))
  • Heap Fetches: 8
  • Buffers: shared hit=33 read=1
144.          

SubPlan (for Index Only Scan)

145. 0.000 0.064 ↑ 1.0 1 8

Limit (cost=0.43..1.12 rows=1 width=12) (actual time=0.008..0.008 rows=1 loops=8)

  • Output: items_1.id, items_1.created_at
  • Buffers: shared hit=32
146. 0.064 0.064 ↑ 13.0 1 8

Index Scan using index_items_on_ticket_id_and_created_at on public.items items_1 (cost=0.43..9.38 rows=13 width=12) (actual time=0.008..0.008 rows=1 loops=8)

  • Output: items_1.id, items_1.created_at
  • Index Cond: (items_1.ticket_id = tickets.id)
  • Filter: ((items_1.type)::text = 'Message'::text)
  • Buffers: shared hit=32
147. 0.000 0.040 ↑ 1.0 1 8

Index Only Scan using items_pkey on public.items last_message (cost=1.56..2.68 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=8)

  • Output: last_message.id
  • Index Cond: (last_message.id = (SubPlan 2))
  • Heap Fetches: 8
  • Buffers: shared hit=33
148.          

SubPlan (for Index Only Scan)

149. 0.008 0.040 ↑ 1.0 1 8

Limit (cost=0.43..1.12 rows=1 width=12) (actual time=0.005..0.005 rows=1 loops=8)

  • Output: items_2.id, items_2.created_at
  • Buffers: shared hit=32
150. 0.032 0.032 ↑ 13.0 1 8

Index Scan Backward using index_items_on_ticket_id_and_created_at on public.items items_2 (cost=0.43..9.38 rows=13 width=12) (actual time=0.004..0.004 rows=1 loops=8)

  • Output: items_2.id, items_2.created_at
  • Index Cond: (items_2.ticket_id = tickets.id)
  • Filter: ((items_2.type)::text = 'Message'::text)
  • Buffers: shared hit=32
151. 0.032 0.032 ↑ 1.0 1 8

Index Only Scan using index_sources_on_id_and_cached_label on public.sources (cost=0.27..2.48 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=8)

  • Output: sources.id, sources.cached_label
  • Index Cond: (sources.id = 44)
  • Heap Fetches: 8
  • Buffers: shared hit=25
Planning time : 18.203 ms
Execution time : 77,712.794 ms