explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kaw8

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 80,100.380 ↓ 8.0 8 1

Limit (cost=18,340,951.44..18,340,951.45 rows=1 width=950) (actual time=80,100.377..80,100.380 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=37,092,477 read=384,195 dirtied=6
2. 0.034 80,100.378 ↓ 8.0 8 1

Sort (cost=18,340,951.44..18,340,951.45 rows=1 width=950) (actual time=80,100.375..80,100.378 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=37,092,477 read=384,195 dirtied=6
3. 0.009 80,100.344 ↓ 8.0 8 1

Nested Loop (cost=18,337,860.33..18,340,951.43 rows=1 width=950) (actual time=80,093.584..80,100.344 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=37,092,477 read=384,195 dirtied=6
4. 0.068 80,100.295 ↓ 8.0 8 1

Nested Loop (cost=18,337,860.06..18,340,948.94 rows=1 width=954) (actual time=80,093.567..80,100.295 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=37,092,452 read=384,195 dirtied=6
5. 0.121 80,100.179 ↓ 8.0 8 1

Nested Loop (cost=18,337,858.51..18,340,946.25 rows=1 width=954) (actual time=80,093.538..80,100.179 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=37,092,387 read=384,195 dirtied=6
6. 385.276 80,100.010 ↑ 138.1 8 1

Index Scan using index_tickets_on_status_nulls_first on public.tickets (cost=18,337,856.95..18,337,967.22 rows=1,105 width=950) (actual time=80,093.484..80,100.010 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) AND (hashed SubPlan 6) AND (hashed SubPlan 7)) OR (hashed SubPlan 8)))
  • Rows Removed by Filter: 1,520
  • Buffers: shared hit=37,092,321 read=384,195 dirtied=6
7.          

SubPlan (for Index Scan)

8. 0.259 16,759.669 ↑ 2,917.9 1,520 1

Subquery Scan on items_3 (cost=2,914,295.04..3,058,437.83 rows=4,435,163 width=4) (actual time=16,758.874..16,759.669 rows=1,520 loops=1)

  • Output: items_3.ticket_id
  • Buffers: shared hit=8,984,297 read=382,112 dirtied=6
9. 0.322 16,759.410 ↑ 2,917.9 1,520 1

Unique (cost=2,914,295.04..3,014,086.20 rows=4,435,163 width=1,092) (actual time=16,758.872..16,759.410 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=8,984,297 read=382,112 dirtied=6
10. 1.385 16,759.088 ↑ 2,917.9 1,520 1

Sort (cost=2,914,295.04..2,925,382.94 rows=4,435,163 width=1,092) (actual time=16,758.871..16,759.088 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=8,984,297 read=382,112 dirtied=6
11. 0.233 16,757.703 ↑ 2,917.9 1,520 1

Append (cost=47,263.56..1,181,582.22 rows=4,435,163 width=1,092) (actual time=9,107.648..16,757.703 rows=1,520 loops=1)

  • Buffers: shared hit=8,984,297 read=382,112 dirtied=6
12. 558.488 12,441.419 ↑ 2,274.6 1,520 1

Hash Semi Join (cost=47,263.56..668,547.42 rows=3,457,397 width=205) (actual time=9,107.646..12,441.419 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=3,500,157 read=357,267 dirtied=4
13. 2,087.276 11,554.149 ↓ 1.3 4,532,940 1

Hash Semi Join (cost=15.49..573,756.20 rows=3,458,896 width=205) (actual time=0.384..11,554.149 rows=4,532,940 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=3,485,982 read=340,674 dirtied=1
14. 9,466.783 9,466.783 ↓ 1.1 4,532,940 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.280..9,466.783 rows=4,532,940 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=3,485,924 read=340,674 dirtied=1
15. 0.010 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_1.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
16. 0.080 0.080 ↑ 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.012..0.080 rows=58 loops=1)

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

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

  • Output: social_profiles.id
  • Buckets: 1,048,576 Batches: 1 Memory Usage: 8,213kB
  • Buffers: shared hit=14,175 read=16,593 dirtied=3
18. 0.152 328.542 ↑ 1,714.3 589 1

Nested Loop (cost=34,624.77..34,626.45 rows=1,009,730 width=4) (actual time=321.169..328.542 rows=589 loops=1)

  • Output: social_profiles.id
  • Buffers: shared hit=14,175 read=16,593 dirtied=3
19. 0.587 321.322 ↓ 147.2 589 1

HashAggregate (cost=34,624.34..34,624.38 rows=4 width=15) (actual time=321.133..321.322 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=12,428 read=15,980 dirtied=3
20. 6.460 320.735 ↓ 147.2 589 1

Gather (cost=9,186.85..34,624.33 rows=4 width=15) (actual time=12.635..320.735 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=12,428 read=15,980 dirtied=3
21. 126.577 314.275 ↓ 147.0 147 4 / 4

Hash Semi Join (cost=8,186.85..33,623.93 rows=1 width=15) (actual time=59.032..314.275 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=11,642 read=15,980 dirtied=3
  • Worker 0: actual time=37.248..311.380 rows=98 loops=1
  • Buffers: shared hit=2,750 read=3,354 dirtied=1
  • Worker 1: actual time=81.332..313.316 rows=173 loops=1
  • Buffers: shared hit=2,953 read=3,540
  • Worker 2: actual time=105.771..313.801 rows=149 loops=1
  • Buffers: shared hit=2,876 read=3,030 dirtied=1
22. 179.731 179.731 ↑ 1.3 331,568 4 / 4

Parallel Seq Scan on public.client_users (cost=0.00..24,329.26 rows=422,026 width=4) (actual time=0.077..179.731 rows=331,568 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=4,272 read=15,837 dirtied=3
  • Worker 0: actual time=0.037..200.779 rows=278,154 loops=1
  • Buffers: shared hit=868 read=3,354 dirtied=1
  • Worker 1: actual time=0.063..164.470 rows=296,766 loops=1
  • Buffers: shared hit=1,071 read=3,540
  • Worker 2: actual time=0.067..159.367 rows=259,682 loops=1
  • Buffers: shared hit=994 read=3,030 dirtied=1
23. 0.307 7.967 ↑ 1,110.6 589 4 / 4

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

  • Output: client_users_1.id, custom_field_values.binded_key
  • Buckets: 1,048,576 Batches: 1 Memory Usage: 8,218kB
  • Buffers: shared hit=7,331 read=143
  • Worker 0: actual time=9.018..9.018 rows=589 loops=1
  • Buffers: shared hit=1,869
  • Worker 1: actual time=6.317..6.317 rows=589 loops=1
  • Buffers: shared hit=1,869
  • Worker 2: actual time=9.670..9.670 rows=589 loops=1
  • Buffers: shared hit=1,869
24. 0.421 7.660 ↑ 1,110.6 589 4 / 4

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

  • Output: client_users_1.id, custom_field_values.binded_key
  • Buffers: shared hit=7,331 read=143
  • Worker 0: actual time=1.319..8.479 rows=589 loops=1
  • Buffers: shared hit=1,869
  • Worker 1: actual time=0.746..6.085 rows=589 loops=1
  • Buffers: shared hit=1,869
  • Worker 2: actual time=1.642..9.421 rows=589 loops=1
  • Buffers: shared hit=1,869
25. 0.346 1.349 ↓ 147.2 589 4 / 4

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

  • Output: custom_field_values.binded_key
  • Group Key: (custom_field_values.binded_key)::integer
  • Buffers: shared hit=90 read=13
  • Worker 0: actual time=1.128..1.390 rows=589 loops=1
  • Buffers: shared hit=26
  • Worker 1: actual time=0.664..0.811 rows=589 loops=1
  • Buffers: shared hit=26
  • Worker 2: actual time=1.552..1.740 rows=589 loops=1
  • Buffers: shared hit=26
26. 1.003 1.003 ↓ 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.086..1.003 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=90 read=13
  • Worker 0: actual time=0.108..0.965 rows=589 loops=1
  • Buffers: shared hit=26
  • Worker 1: actual time=0.103..0.500 rows=589 loops=1
  • Buffers: shared hit=26
  • Worker 2: actual time=0.107..1.389 rows=589 loops=1
  • Buffers: shared hit=26
27. 5.890 5.890 ↑ 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.010..0.010 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=7,241 read=130
  • Worker 0: actual time=0.011..0.011 rows=1 loops=589
  • Buffers: shared hit=1,843
  • Worker 1: actual time=0.008..0.008 rows=1 loops=589
  • Buffers: shared hit=1,843
  • Worker 2: actual time=0.012..0.013 rows=1 loops=589
  • Buffers: shared hit=1,843
28. 7.068 7.068 ↑ 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.012..0.012 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=1,747 read=613
29. 0.023 4,316.051 ↓ 0.0 0 1

Hash Semi Join (cost=79,988.08..468,683.17 rows=977,766 width=205) (actual time=4,316.051..4,316.051 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=5,484,140 read=24,845 dirtied=2
30. 169.904 4,315.949 ↓ 0.0 0 1

Merge Semi Join (cost=79,973.02..454,857.39 rows=1,117,362 width=209) (actual time=4,315.949..4,315.949 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=5,484,082 read=24,845 dirtied=2
31. 1,744.421 1,744.421 ↓ 1.1 1,237,187 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.043..1,744.421 rows=1,237,187 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=1,192,150 read=22,101
32. 0.138 2,401.624 ↑ 1,110.6 589 1

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

  • Output: client_users_2.id, client_users_3.id, custom_field_values_1.binded_key
  • Buffers: shared hit=4,291,932 read=2,744 dirtied=2
33. 801.179 2,401.486 ↑ 1,110.6 589 1

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

  • Output: client_users_2.id, client_users_3.id, custom_field_values_1.binded_key
  • Buffers: shared hit=4,291,932 read=2,744 dirtied=2
34. 274.033 274.033 ↓ 1.0 1,326,274 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.023..274.033 rows=1,326,274 loops=1)

  • Output: client_users_2.id
  • Heap Fetches: 181,849
  • Buffers: shared hit=126,854
35. 0.000 1,326.274 ↓ 0.0 0 1,326,274

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

  • 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=4,165,078 read=2,744 dirtied=2
36. 1,326.274 1,326.274 ↑ 1.0 1 1,326,274

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,274)

  • Output: client_users_3.id
  • Index Cond: (client_users_3.id = client_users_2.id)
  • Heap Fetches: 181,849
  • Buffers: shared hit=4,165,053 read=2,744 dirtied=2
37. 0.125 0.288 ↓ 147.2 589 1

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

  • Output: custom_field_values_1.binded_key
  • Buckets: 1,024 Batches: 1 Memory Usage: 31kB
  • Buffers: shared hit=25
38. 0.163 0.163 ↓ 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.020..0.163 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.009 0.079 ↑ 1.0 58 1

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

  • Output: sources_2.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
40. 0.070 0.070 ↑ 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.011..0.070 rows=58 loops=1)

  • Output: sources_2.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
41. 0.113 14,405.283 ↑ 7,441.5 596 1

Subquery Scan on items_6 (cost=2,894,955.98..3,039,098.78 rows=4,435,163 width=4) (actual time=14,404.962..14,405.283 rows=596 loops=1)

  • Output: items_6.ticket_id
  • Buffers: shared hit=9,160,844 read=44
42. 0.129 14,405.170 ↑ 7,441.5 596 1

Unique (cost=2,894,955.98..2,994,747.15 rows=4,435,163 width=1,092) (actual time=14,404.960..14,405.170 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=9,160,844 read=44
43. 0.518 14,405.041 ↑ 7,441.5 596 1

Sort (cost=2,894,955.98..2,906,043.89 rows=4,435,163 width=1,092) (actual time=14,404.959..14,405.041 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=9,160,844 read=44
44. 0.105 14,404.523 ↑ 7,441.5 596 1

Append (cost=47,346.79..1,162,243.16 rows=4,435,163 width=1,092) (actual time=6,610.690..14,404.523 rows=596 loops=1)

  • Buffers: shared hit=9,160,844 read=44
45. 498.236 7,615.146 ↑ 5,801.0 596 1

Hash Semi Join (cost=47,346.79..668,630.65 rows=3,457,397 width=205) (actual time=6,610.688..7,615.146 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=3,852,348
46. 2,079.505 6,949.548 ↓ 1.3 4,532,940 1

Hash Semi Join (cost=15.49..573,756.20 rows=3,458,896 width=205) (actual time=0.140..6,949.548 rows=4,532,940 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=3,826,656
47. 4,869.947 4,869.947 ↓ 1.1 4,532,940 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.027..4,869.947 rows=4,532,940 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=3,826,598
48. 0.008 0.096 ↑ 1.0 58 1

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

  • Output: sources_3.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
49. 0.088 0.088 ↑ 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.009..0.088 rows=58 loops=1)

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

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

  • Output: social_profiles_1.id
  • Buckets: 1,048,576 Batches: 1 Memory Usage: 8,202kB
  • Buffers: shared hit=25,692
51. 0.103 167.247 ↑ 3,698.6 273 1

Nested Loop (cost=34,689.60..34,709.68 rows=1,009,730 width=4) (actual time=165.746..167.247 rows=273 loops=1)

  • Output: social_profiles_1.id
  • Buffers: shared hit=25,692
52. 0.350 165.779 ↓ 7.0 273 1

HashAggregate (cost=34,689.17..34,689.56 rows=39 width=15) (actual time=165.727..165.779 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=24,597
53. 6.671 165.429 ↓ 7.0 273 1

Gather (cost=9,247.95..34,689.07 rows=39 width=15) (actual time=8.503..165.429 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=24,597
54. 103.822 158.758 ↓ 5.2 68 4 / 4

Hash Semi Join (cost=8,247.95..33,685.17 rows=13 width=15) (actual time=48.988..158.758 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=23,802
  • Worker 0: actual time=78.797..158.035 rows=45 loops=1
  • Buffers: shared hit=4,963
  • Worker 1: actual time=36.344..158.034 rows=68 loops=1
  • Buffers: shared hit=5,613
  • Worker 2: actual time=73.198..155.652 rows=67 loops=1
  • Buffers: shared hit=5,678
55. 51.259 51.259 ↑ 1.3 331,568 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.019..51.259 rows=331,568 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=20,109
  • Worker 0: actual time=0.037..54.503 rows=261,999 loops=1
  • Buffers: shared hit=4,036
  • Worker 1: actual time=0.018..54.652 rows=304,561 loops=1
  • Buffers: shared hit=4,686
  • Worker 2: actual time=0.016..53.113 rows=307,040 loops=1
  • Buffers: shared hit=4,751
56. 0.158 3.677 ↑ 2,396.1 273 4 / 4

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

  • Output: client_users_5.id, custom_field_values_2.binded_key
  • Buckets: 1,048,576 Batches: 1 Memory Usage: 8,204kB
  • Buffers: shared hit=3,654
  • Worker 0: actual time=5.820..5.820 rows=273 loops=1
  • Buffers: shared hit=914
  • Worker 1: actual time=3.606..3.606 rows=273 loops=1
  • Buffers: shared hit=914
  • Worker 2: actual time=3.279..3.279 rows=273 loops=1
  • Buffers: shared hit=914
57. 0.119 3.519 ↑ 2,396.1 273 4 / 4

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

  • Output: client_users_5.id, custom_field_values_2.binded_key
  • Buffers: shared hit=3,654
  • Worker 0: actual time=1.928..5.688 rows=273 loops=1
  • Buffers: shared hit=914
  • Worker 1: actual time=0.806..3.511 rows=273 loops=1
  • Buffers: shared hit=914
  • Worker 2: actual time=0.798..3.170 rows=273 loops=1
  • Buffers: shared hit=914
58. 0.121 0.943 ↓ 7.0 273 4 / 4

HashAggregate (cost=8.87..9.26 rows=39 width=7) (actual time=0.902..0.943 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=1.843..1.885 rows=273 loops=1
  • Buffers: shared hit=74
  • Worker 1: actual time=0.725..0.767 rows=273 loops=1
  • Buffers: shared hit=74
  • Worker 2: actual time=0.726..0.768 rows=273 loops=1
  • Buffers: shared hit=74
59. 0.822 0.822 ↓ 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.089..0.822 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.118..1.748 rows=273 loops=1
  • Buffers: shared hit=74
  • Worker 1: actual time=0.102..0.643 rows=273 loops=1
  • Buffers: shared hit=74
  • Worker 2: actual time=0.103..0.660 rows=273 loops=1
  • Buffers: shared hit=74
60. 2.457 2.457 ↑ 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.009..0.009 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=3,359
  • Worker 0: actual time=0.013..0.013 rows=1 loops=273
  • Buffers: shared hit=840
  • Worker 1: actual time=0.009..0.010 rows=1 loops=273
  • Buffers: shared hit=840
  • Worker 2: actual time=0.008..0.008 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.005..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=1,095
62. 478.226 6,789.272 ↓ 0.0 0 1

Nested Loop Semi Join (cost=25.64..449,260.88 rows=977,766 width=205) (actual time=6,789.272..6,789.272 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=5,308,496 read=44
63. 652.142 2,476.956 ↓ 1.3 1,278,030 1

Hash Semi Join (cost=15.49..416,238.56 rows=978,190 width=205) (actual time=0.102..2,476.956 rows=1,278,030 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=1,254,120 read=44
64. 1,824.752 1,824.752 ↓ 1.1 1,278,030 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,824.752 rows=1,278,030 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=1,254,062 read=44
65. 0.008 0.062 ↑ 1.0 58 1

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

  • Output: sources_4.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
66. 0.054 0.054 ↑ 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.008..0.054 rows=58 loops=1)

  • Output: sources_4.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
67. 1,278.021 3,834.090 ↓ 0.0 0 1,278,030

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

  • 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=4,054,376
68. 0.009 0.009 ↑ 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.009..0.009 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.060 ↓ 0.0 0 1,278,030

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

  • Output: client_users_7.id, custom_field_values_3.binded_key
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=4,054,372
70. 1,277.809 2,556.060 ↓ 0.0 0 1,278,030

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

  • 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=4,054,372
71. 1,278.030 1,278.030 ↑ 1.0 1 1,278,030

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,030)

  • Output: client_users_7.id
  • Index Cond: (client_users_7.id = items_8.author_id)
  • Heap Fetches: 213,577
  • Buffers: shared hit=4,054,299
72. 0.059 0.221 ↓ 7.0 273 1

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

  • Output: custom_field_values_3.binded_key
  • Buckets: 1,024 Batches: 1 Memory Usage: 19kB
  • Buffers: shared hit=73
73. 0.162 0.162 ↓ 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.026..0.162 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.499 30,833.293 ↑ 1,357.1 3,268 1

Subquery Scan on items_9 (cost=2,900,781.25..3,044,924.05 rows=4,435,163 width=4) (actual time=30,831.358..30,833.293 rows=3,268 loops=1)

  • Output: items_9.ticket_id
  • Buffers: shared hit=9,727,745 read=2,039
75. 0.798 30,832.794 ↑ 1,357.1 3,268 1

Unique (cost=2,900,781.25..3,000,572.42 rows=4,435,163 width=1,092) (actual time=30,831.356..30,832.794 rows=3,268 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=9,727,745 read=2,039
76. 3.769 30,831.996 ↑ 1,357.1 3,268 1

Sort (cost=2,900,781.25..2,911,869.16 rows=4,435,163 width=1,092) (actual time=30,831.355..30,831.996 rows=3,268 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: 862kB
  • Buffers: shared hit=9,727,745 read=2,039
77. 0.415 30,828.227 ↑ 1,357.1 3,268 1

Append (cost=53,107.61..1,168,068.43 rows=4,435,163 width=1,092) (actual time=5,093.207..30,828.227 rows=3,268 loops=1)

  • Buffers: shared hit=9,727,745 read=2,039
78. 569.154 7,878.063 ↑ 1,058.0 3,268 1

Hash Semi Join (cost=53,107.61..674,391.46 rows=3,457,397 width=205) (actual time=5,093.205..7,878.063 rows=3,268 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=3,864,038
79. 2,093.245 7,097.969 ↓ 1.3 4,532,940 1

Hash Semi Join (cost=15.49..573,756.20 rows=3,458,896 width=205) (actual time=0.132..7,097.969 rows=4,532,940 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=3,826,656
80. 5,004.635 5,004.635 ↓ 1.1 4,532,940 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.028..5,004.635 rows=4,532,940 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=3,826,598
81. 0.009 0.089 ↑ 1.0 58 1

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

  • Output: sources_5.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
82. 0.080 0.080 ↑ 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.010..0.080 rows=58 loops=1)

  • Output: sources_5.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
83. 0.435 210.940 ↑ 1,055.1 957 1

Hash (cost=40,470.49..40,470.49 rows=1,009,730 width=4) (actual time=210.940..210.940 rows=957 loops=1)

  • Output: social_profiles_2.id
  • Buckets: 1,048,576 Batches: 1 Memory Usage: 8,226kB
  • Buffers: shared hit=37,382
84. 0.196 210.505 ↑ 1,055.1 957 1

Nested Loop (cost=38,965.63..40,470.49 rows=1,009,730 width=4) (actual time=205.266..210.505 rows=957 loops=1)

  • Output: social_profiles_2.id
  • Buffers: shared hit=37,382
85. 0.759 205.524 ↑ 3.0 957 1

HashAggregate (cost=38,965.21..38,993.84 rows=2,863 width=15) (actual time=205.247..205.524 rows=957 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=33,549
86. 7.109 204.765 ↑ 3.0 957 1

Gather (cost=13,224.39..38,958.05 rows=2,863 width=15) (actual time=66.657..204.765 rows=957 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=33,549
87. 131.461 197.656 ↑ 3.9 239 4 / 4

Hash Semi Join (cost=12,224.39..37,671.75 rows=924 width=15) (actual time=47.001..197.656 rows=239 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=32,763
  • Worker 0: actual time=33.063..193.920 rows=236 loops=1
  • Buffers: shared hit=8,669
  • Worker 1: actual time=36.412..195.651 rows=230 loops=1
  • Buffers: shared hit=8,315
  • Worker 2: actual time=52.800..198.470 rows=164 loops=1
  • Buffers: shared hit=6,598
88. 53.174 53.174 ↑ 1.3 331,568 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.013..53.174 rows=331,568 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=20,109
  • Worker 0: actual time=0.017..58.433 rows=370,900 loops=1
  • Buffers: shared hit=5,501
  • Worker 1: actual time=0.019..62.881 rows=338,747 loops=1
  • Buffers: shared hit=5,147
  • Worker 2: actual time=0.011..56.626 rows=231,824 loops=1
  • Buffers: shared hit=3,430
89. 0.558 13.021 ↑ 683.5 957 4 / 4

Hash (cost=4,047.64..4,047.64 rows=654,140 width=11) (actual time=13.021..13.021 rows=957 loops=4)

  • Output: client_users_9.id, custom_field_values_4.binded_key
  • Buckets: 1,048,576 Batches: 1 Memory Usage: 8,234kB
  • Buffers: shared hit=12,615
  • Worker 0: actual time=15.762..15.762 rows=957 loops=1
  • Buffers: shared hit=3,155
  • Worker 1: actual time=21.402..21.402 rows=957 loops=1
  • Buffers: shared hit=3,155
  • Worker 2: actual time=10.127..10.127 rows=957 loops=1
  • Buffers: shared hit=3,155
90. 0.383 12.463 ↑ 683.5 957 4 / 4

Nested Loop (cost=450.59..4,047.64 rows=654,140 width=11) (actual time=2.235..12.463 rows=957 loops=4)

  • Output: client_users_9.id, custom_field_values_4.binded_key
  • Buffers: shared hit=12,615
  • Worker 0: actual time=2.251..15.361 rows=957 loops=1
  • Buffers: shared hit=3,155
  • Worker 1: actual time=3.584..20.265 rows=957 loops=1
  • Buffers: shared hit=3,155
  • Worker 2: actual time=2.137..9.755 rows=957 loops=1
  • Buffers: shared hit=3,155
91. 0.622 2.510 ↑ 3.0 957 4 / 4

HashAggregate (cost=450.15..478.62 rows=2,847 width=7) (actual time=2.175..2.510 rows=957 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=2.186..2.636 rows=957 loops=1
  • Buffers: shared hit=187
  • Worker 1: actual time=3.505..4.025 rows=957 loops=1
  • Buffers: shared hit=187
  • Worker 2: actual time=2.067..2.271 rows=957 loops=1
  • Buffers: shared hit=187
92. 1.888 1.888 ↑ 3.0 957 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..443.00 rows=2,863 width=7) (actual time=0.126..1.888 rows=957 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 <> 'Large'::text)
  • Rows Removed by Filter: 691
  • Heap Fetches: 190
  • Buffers: shared hit=744
  • Worker 0: actual time=0.145..1.838 rows=957 loops=1
  • Buffers: shared hit=187
  • Worker 1: actual time=0.170..3.202 rows=957 loops=1
  • Buffers: shared hit=187
  • Worker 2: actual time=0.147..1.804 rows=957 loops=1
  • Buffers: shared hit=187
93. 9.570 9.570 ↑ 1.0 1 3,828 / 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.010..0.010 rows=1 loops=3,828)

  • Output: client_users_9.id
  • Index Cond: (client_users_9.id = (custom_field_values_4.binded_key)::integer)
  • Heap Fetches: 87
  • Buffers: shared hit=11,871
  • Worker 0: actual time=0.013..0.013 rows=1 loops=957
  • Buffers: shared hit=2,968
  • Worker 1: actual time=0.016..0.016 rows=1 loops=957
  • Buffers: shared hit=2,968
  • Worker 2: actual time=0.007..0.007 rows=1 loops=957
  • Buffers: shared hit=2,968
94. 4.785 4.785 ↑ 2.0 1 957

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.005..0.005 rows=1 loops=957)

  • 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=3,833
95. 928.475 22,949.749 ↓ 0.0 0 1

Nested Loop Semi Join (cost=90.10..449,325.34 rows=977,766 width=205) (actual time=22,949.749..22,949.749 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=5,863,707 read=2,039
96. 688.861 2,850.824 ↓ 1.3 1,278,030 1

Hash Semi Join (cost=15.49..416,238.56 rows=978,190 width=205) (actual time=0.123..2,850.824 rows=1,278,030 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=1,254,164
97. 2,161.897 2,161.897 ↓ 1.1 1,278,030 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.024..2,161.897 rows=1,278,030 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=1,254,106
98. 0.005 0.066 ↑ 1.0 58 1

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

  • Output: sources_6.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
99. 0.061 0.061 ↑ 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.008..0.061 rows=58 loops=1)

  • Output: sources_6.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
100. 1,278.020 19,170.450 ↓ 0.0 0 1,278,030

Hash Semi Join (cost=74.61..74.64 rows=1 width=15) (actual time=0.015..0.015 rows=0 loops=1,278,030)

  • 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=4,609,543 read=2,039
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 17,892.420 ↓ 0.0 0 1,278,030

Hash (cost=74.17..74.17 rows=1 width=11) (actual time=0.014..0.014 rows=0 loops=1,278,030)

  • Output: client_users_11.id, custom_field_values_5.binded_key
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=4,609,539 read=2,039
103. 1,278.027 17,892.420 ↓ 0.0 0 1,278,030

Hash Semi Join (cost=74.15..74.17 rows=1 width=11) (actual time=0.014..0.014 rows=0 loops=1,278,030)

  • 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=4,609,539 read=2,039
104. 0.003 0.003 ↑ 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.003..0.003 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.030 16,614.390 ↓ 0.0 0 1,278,030

Hash (cost=73.55..73.55 rows=14 width=7) (actual time=0.013..0.013 rows=0 loops=1,278,030)

  • Output: custom_field_values_5.binded_key
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=4,609,535 read=2,039
106. 0.000 15,336.360 ↓ 0.0 0 1,278,030

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

  • 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 <> 'Large'::text))
  • Buffers: shared hit=4,609,535 read=2,039
107. 1,402.710 15,336.360 ↓ 0.0 0 1,278,030

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

  • Buffers: shared hit=4,609,535 read=2,039
108. 1,278.030 1,278.030 ↓ 0.0 0 1,278,030

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

  • Index Cond: ((custom_field_values_5.binded_key)::integer = items_11.author_id)
  • Buffers: shared hit=3,836,136 read=2,039
109. 12,655.620 12,655.620 ↑ 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.180..0.180 rows=1,648 loops=70,309)

  • Index Cond: (custom_field_values_5.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid)
  • Buffers: shared hit=773,399
110. 0.000 0.000 ↓ 0.0 0

Subquery Scan on items_12 (cost=2,900,776.84..3,044,919.64 rows=4,435,163 width=4) (never executed)

  • Output: items_12.ticket_id
111. 0.000 0.000 ↓ 0.0 0

Unique (cost=2,900,776.84..3,000,568.01 rows=4,435,163 width=1,092) (never executed)

  • 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
112. 0.000 0.000 ↓ 0.0 0

Sort (cost=2,900,776.84..2,911,864.75 rows=4,435,163 width=1,092) (never executed)

  • 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
113. 0.000 0.000 ↓ 0.0 0

Append (cost=53,103.20..1,168,064.02 rows=4,435,163 width=1,092) (never executed)

114. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=53,103.20..674,387.05 rows=3,457,397 width=205) (never executed)

  • 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)
115. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=15.49..573,756.20 rows=3,458,896 width=205) (never executed)

  • 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)
116. 0.000 0.000 ↓ 0.0 0

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) (never executed)

  • 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)
117. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.34..14.34 rows=58 width=4) (never executed)

  • Output: sources_7.id
118. 0.000 0.000 ↓ 0.0 0

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) (never executed)

  • Output: sources_7.id
  • Heap Fetches: 0
119. 0.000 0.000 ↓ 0.0 0

Hash (cost=40,466.08..40,466.08 rows=1,009,730 width=4) (never executed)

  • Output: social_profiles_3.id
120. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=38,962.80..40,466.08 rows=1,009,730 width=4) (never executed)

  • Output: social_profiles_3.id
121. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=38,962.37..38,990.97 rows=2,860 width=15) (never executed)

  • Output: client_users_12.id, client_users_13.id, custom_field_values_6.binded_key
  • Group Key: client_users_12.id
122. 0.000 0.000 ↓ 0.0 0

Gather (cost=13,221.88..38,955.22 rows=2,860 width=15) (never executed)

  • Output: client_users_12.id, client_users_13.id, custom_field_values_6.binded_key
  • Workers Planned: 3
  • Workers Launched: 0
123. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=12,221.88..37,669.22 rows=923 width=15) (never executed)

  • 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)
124. 0.000 0.000 ↓ 0.0 0

Parallel Seq Scan on public.client_users client_users_12 (cost=0.00..24,329.26 rows=422,026 width=4) (never executed)

  • 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
125. 0.000 0.000 ↓ 0.0 0

Hash (cost=4,045.13..4,045.13 rows=654,140 width=11) (never executed)

  • Output: client_users_13.id, custom_field_values_6.binded_key
126. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=450.58..4,045.13 rows=654,140 width=11) (never executed)

  • Output: client_users_13.id, custom_field_values_6.binded_key
127. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=450.15..478.59 rows=2,844 width=7) (never executed)

  • Output: custom_field_values_6.binded_key
  • Group Key: (custom_field_values_6.binded_key)::integer
128. 0.000 0.000 ↓ 0.0 0

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..443.00 rows=2,860 width=7) (never executed)

  • Output: custom_field_values_6.binded_key, (custom_field_values_6.binded_key)::integer
  • Index Cond: (custom_field_values_6.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid)
  • Filter: (custom_field_values_6.value <> 'SME'::text)
  • Heap Fetches: 0
129. 0.000 0.000 ↓ 0.0 0

Index Only Scan using client_users_pkey on public.client_users client_users_13 (cost=0.43..1.24 rows=1 width=4) (never executed)

  • Output: client_users_13.id
  • Index Cond: (client_users_13.id = (custom_field_values_6.binded_key)::integer)
  • Heap Fetches: 0
130. 0.000 0.000 ↓ 0.0 0

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) (never executed)

  • Output: social_profiles_3.client_user_id, social_profiles_3.id
  • Index Cond: (social_profiles_3.client_user_id = client_users_13.id)
131. 0.000 0.000 ↓ 0.0 0

Nested Loop Semi Join (cost=90.10..449,325.34 rows=977,766 width=205) (never executed)

  • 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
132. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=15.49..416,238.56 rows=978,190 width=205) (never executed)

  • 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)
133. 0.000 0.000 ↓ 0.0 0

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) (never executed)

  • 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)
134. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.34..14.34 rows=58 width=4) (never executed)

  • Output: sources_8.id
135. 0.000 0.000 ↓ 0.0 0

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) (never executed)

  • Output: sources_8.id
  • Heap Fetches: 0
136. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=74.61..74.64 rows=1 width=15) (never executed)

  • 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)
137. 0.000 0.000 ↓ 0.0 0

Index Only Scan using client_users_pkey on public.client_users client_users_14 (cost=0.43..0.45 rows=1 width=4) (never executed)

  • Output: client_users_14.id
  • Index Cond: (client_users_14.id = items_14.author_id)
  • Heap Fetches: 0
138. 0.000 0.000 ↓ 0.0 0

Hash (cost=74.17..74.17 rows=1 width=11) (never executed)

  • Output: client_users_15.id, custom_field_values_7.binded_key
139. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=74.15..74.17 rows=1 width=11) (never executed)

  • Output: client_users_15.id, custom_field_values_7.binded_key
  • Hash Cond: (client_users_15.id = (custom_field_values_7.binded_key)::integer)
140. 0.000 0.000 ↓ 0.0 0

Index Only Scan using client_users_pkey on public.client_users client_users_15 (cost=0.43..0.45 rows=1 width=4) (never executed)

  • Output: client_users_15.id
  • Index Cond: (client_users_15.id = items_14.author_id)
  • Heap Fetches: 0
141. 0.000 0.000 ↓ 0.0 0

Hash (cost=73.55..73.55 rows=14 width=7) (never executed)

  • Output: custom_field_values_7.binded_key
142. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on public.custom_field_values custom_field_values_7 (cost=72.13..73.55 rows=14 width=7) (never executed)

  • Output: custom_field_values_7.binded_key
  • Recheck Cond: (((custom_field_values_7.binded_key)::integer = items_14.author_id) AND (custom_field_values_7.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid))
  • Filter: ((custom_field_values_7.deleted_at IS NULL) AND (custom_field_values_7.value <> 'SME'::text))
143. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=72.13..72.13 rows=14 width=0) (never executed)

144. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on test_cfv_binded_key_integer (cost=0.00..28.36 rows=3,725 width=0) (never executed)

  • Index Cond: ((custom_field_values_7.binded_key)::integer = items_14.author_id)
145. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on test_cfv_cf_id_and_value (cost=0.00..42.80 rows=2,863 width=0) (never executed)

  • Index Cond: (custom_field_values_7.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid)
146. 0.000 0.000 ↓ 0.0 0

Subquery Scan on items_15 (cost=2,900,781.25..3,044,924.05 rows=4,435,163 width=4) (never executed)

  • Output: items_15.ticket_id
147. 0.000 0.000 ↓ 0.0 0

Unique (cost=2,900,781.25..3,000,572.42 rows=4,435,163 width=1,092) (never executed)

  • Output: items_16.id, items_16.type, items_16.ticket_id, items_16.author_type, items_16.author_id, items_16.body, items_16.created_at, items_16.updated_at
148. 0.000 0.000 ↓ 0.0 0

Sort (cost=2,900,781.25..2,911,869.16 rows=4,435,163 width=1,092) (never executed)

  • Output: items_16.id, items_16.type, items_16.ticket_id, items_16.author_type, items_16.author_id, items_16.body, items_16.created_at, items_16.updated_at
  • Sort Key: items_16.id, items_16.type, items_16.ticket_id, items_16.author_type, items_16.author_id, items_16.body, items_16.created_at, items_16.updated_at
149. 0.000 0.000 ↓ 0.0 0

Append (cost=53,107.61..1,168,068.43 rows=4,435,163 width=1,092) (never executed)

150. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=53,107.61..674,391.46 rows=3,457,397 width=205) (never executed)

  • Output: items_16.id, items_16.type, items_16.ticket_id, items_16.author_type, items_16.author_id, items_16.body, items_16.created_at, items_16.updated_at
  • Hash Cond: (items_16.author_id = social_profiles_4.id)
151. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=15.49..573,756.20 rows=3,458,896 width=205) (never executed)

  • Output: items_16.id, items_16.type, items_16.ticket_id, items_16.author_type, items_16.author_id, items_16.body, items_16.created_at, items_16.updated_at
  • Hash Cond: (items_16.source_id = sources_9.id)
152. 0.000 0.000 ↓ 0.0 0

Index Scan using test_items_authors_social_profile on public.items items_16 (cost=0.43..524,885.03 rows=3,952,723 width=209) (never executed)

  • Output: items_16.id, items_16.ticket_id, items_16.source_id, items_16.author_id, items_16.external_id, items_16.body, items_16.created_at, items_16.updated_at, items_16.type, items_16.last_read_at, items_16.author_type, items_16.token, items_16.subject, items_16.external_date, items_16.satisfaction, items_16.vote, items_16.social_feedback, items_16.parent_external_id, items_16.can_reply, items_16.deleted_flag, items_16.job_id, items_16.enrichments, items_16.tags, items_16.response_template_id, items_16.retweet_of, items_16.ancestry, items_16.is_mention, items_16.originator_message_id, items_16.message_type, items_16.tagged_at, items_16.metadata, items_16.client_reply_id, items_16.selected_reply_id, items_16.uuid, items_16.switched_private, items_16.external_api_id
  • Index Cond: ((items_16.type)::text = 'Message'::text)
153. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.34..14.34 rows=58 width=4) (never executed)

  • Output: sources_9.id
154. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_sources_on_id_and_workspace_id on public.sources sources_9 (cost=0.27..14.34 rows=58 width=4) (never executed)

  • Output: sources_9.id
  • Heap Fetches: 0
155. 0.000 0.000 ↓ 0.0 0

Hash (cost=40,470.49..40,470.49 rows=1,009,730 width=4) (never executed)

  • Output: social_profiles_4.id
156. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=38,965.63..40,470.49 rows=1,009,730 width=4) (never executed)

  • Output: social_profiles_4.id
157. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=38,965.21..38,993.84 rows=2,863 width=15) (never executed)

  • Output: client_users_16.id, client_users_17.id, custom_field_values_8.binded_key
  • Group Key: client_users_16.id
158. 0.000 0.000 ↓ 0.0 0

Gather (cost=13,224.39..38,958.05 rows=2,863 width=15) (never executed)

  • Output: client_users_16.id, client_users_17.id, custom_field_values_8.binded_key
  • Workers Planned: 3
  • Workers Launched: 0
159. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=12,224.39..37,671.75 rows=924 width=15) (never executed)

  • Output: client_users_16.id, client_users_17.id, custom_field_values_8.binded_key
  • Hash Cond: (client_users_16.id = client_users_17.id)
160. 0.000 0.000 ↓ 0.0 0

Parallel Seq Scan on public.client_users client_users_16 (cost=0.00..24,329.26 rows=422,026 width=4) (never executed)

  • Output: client_users_16.id, client_users_16.created_at, client_users_16.updated_at, client_users_16.terms_of_service, client_users_16.client_code, client_users_16.pool, client_users_16.email, client_users_16.unconfirmed_email, client_users_16.confirmation_token, client_users_16.confirmed_at, client_users_16.confirmation_sent_at, client_users_16.notifier, client_users_16.notification_token, client_users_16.notification_token_type, client_users_16.note, client_users_16.bot_routing, client_users_16.approved_at
161. 0.000 0.000 ↓ 0.0 0

Hash (cost=4,047.64..4,047.64 rows=654,140 width=11) (never executed)

  • Output: client_users_17.id, custom_field_values_8.binded_key
162. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=450.59..4,047.64 rows=654,140 width=11) (never executed)

  • Output: client_users_17.id, custom_field_values_8.binded_key
163. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=450.15..478.62 rows=2,847 width=7) (never executed)

  • Output: custom_field_values_8.binded_key
  • Group Key: (custom_field_values_8.binded_key)::integer
164. 0.000 0.000 ↓ 0.0 0

Index Only Scan using test_cfv_deleted_null_value_cf_id_binded_key on public.custom_field_values custom_field_values_8 (cost=0.42..443.00 rows=2,863 width=7) (never executed)

  • Output: custom_field_values_8.binded_key, (custom_field_values_8.binded_key)::integer
  • Index Cond: (custom_field_values_8.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid)
  • Filter: (custom_field_values_8.value <> 'E&O'::text)
  • Heap Fetches: 0
165. 0.000 0.000 ↓ 0.0 0

Index Only Scan using client_users_pkey on public.client_users client_users_17 (cost=0.43..1.24 rows=1 width=4) (never executed)

  • Output: client_users_17.id
  • Index Cond: (client_users_17.id = (custom_field_values_8.binded_key)::integer)
  • Heap Fetches: 0
166. 0.000 0.000 ↓ 0.0 0

Index Scan using index_social_profiles_on_client_user_id on public.social_profiles social_profiles_4 (cost=0.43..0.50 rows=2 width=8) (never executed)

  • Output: social_profiles_4.client_user_id, social_profiles_4.id
  • Index Cond: (social_profiles_4.client_user_id = client_users_17.id)
167. 0.000 0.000 ↓ 0.0 0

Nested Loop Semi Join (cost=90.10..449,325.34 rows=977,766 width=205) (never executed)

  • Output: items_17.id, items_17.type, items_17.ticket_id, items_17.author_type, items_17.author_id, items_17.body, items_17.created_at, items_17.updated_at
168. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=15.49..416,238.56 rows=978,190 width=205) (never executed)

  • Output: items_17.id, items_17.type, items_17.ticket_id, items_17.author_type, items_17.author_id, items_17.body, items_17.created_at, items_17.updated_at
  • Hash Cond: (items_17.source_id = sources_10.id)
169. 0.000 0.000 ↓ 0.0 0

Index Scan using test_items_authors_client_user on public.items items_17 (cost=0.43..402,406.79 rows=1,117,846 width=209) (never executed)

  • Output: items_17.id, items_17.ticket_id, items_17.source_id, items_17.author_id, items_17.external_id, items_17.body, items_17.created_at, items_17.updated_at, items_17.type, items_17.last_read_at, items_17.author_type, items_17.token, items_17.subject, items_17.external_date, items_17.satisfaction, items_17.vote, items_17.social_feedback, items_17.parent_external_id, items_17.can_reply, items_17.deleted_flag, items_17.job_id, items_17.enrichments, items_17.tags, items_17.response_template_id, items_17.retweet_of, items_17.ancestry, items_17.is_mention, items_17.originator_message_id, items_17.message_type, items_17.tagged_at, items_17.metadata, items_17.client_reply_id, items_17.selected_reply_id, items_17.uuid, items_17.switched_private, items_17.external_api_id
  • Index Cond: ((items_17.type)::text = 'Message'::text)
170. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.34..14.34 rows=58 width=4) (never executed)

  • Output: sources_10.id
171. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_sources_on_id_and_workspace_id on public.sources sources_10 (cost=0.27..14.34 rows=58 width=4) (never executed)

  • Output: sources_10.id
  • Heap Fetches: 0
172. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=74.61..74.64 rows=1 width=15) (never executed)

  • Output: client_users_18.id, client_users_19.id, custom_field_values_9.binded_key
  • Hash Cond: (client_users_18.id = client_users_19.id)
173. 0.000 0.000 ↓ 0.0 0

Index Only Scan using client_users_pkey on public.client_users client_users_18 (cost=0.43..0.45 rows=1 width=4) (never executed)

  • Output: client_users_18.id
  • Index Cond: (client_users_18.id = items_17.author_id)
  • Heap Fetches: 0
174. 0.000 0.000 ↓ 0.0 0

Hash (cost=74.17..74.17 rows=1 width=11) (never executed)

  • Output: client_users_19.id, custom_field_values_9.binded_key
175. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=74.15..74.17 rows=1 width=11) (never executed)

  • Output: client_users_19.id, custom_field_values_9.binded_key
  • Hash Cond: (client_users_19.id = (custom_field_values_9.binded_key)::integer)
176. 0.000 0.000 ↓ 0.0 0

Index Only Scan using client_users_pkey on public.client_users client_users_19 (cost=0.43..0.45 rows=1 width=4) (never executed)

  • Output: client_users_19.id
  • Index Cond: (client_users_19.id = items_17.author_id)
  • Heap Fetches: 0
177. 0.000 0.000 ↓ 0.0 0

Hash (cost=73.55..73.55 rows=14 width=7) (never executed)

  • Output: custom_field_values_9.binded_key
178. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on public.custom_field_values custom_field_values_9 (cost=72.13..73.55 rows=14 width=7) (never executed)

  • Output: custom_field_values_9.binded_key
  • Recheck Cond: (((custom_field_values_9.binded_key)::integer = items_17.author_id) AND (custom_field_values_9.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid))
  • Filter: ((custom_field_values_9.deleted_at IS NULL) AND (custom_field_values_9.value <> 'E&O'::text))
179. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=72.13..72.13 rows=14 width=0) (never executed)

180. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on test_cfv_binded_key_integer (cost=0.00..28.36 rows=3,725 width=0) (never executed)

  • Index Cond: ((custom_field_values_9.binded_key)::integer = items_17.author_id)
181. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on test_cfv_cf_id_and_value (cost=0.00..42.80 rows=2,863 width=0) (never executed)

  • Index Cond: (custom_field_values_9.custom_field_id = '5138c474-51e6-4cbe-b0b7-63a2186f3340'::uuid)
182. 1.008 17,716.489 ↑ 516.7 8,583 1

Subquery Scan on items_18 (cost=2,894,881.93..3,039,024.73 rows=4,435,163 width=4) (actual time=17,712.247..17,716.489 rows=8,583 loops=1)

  • Output: items_18.ticket_id
  • Buffers: shared hit=9,217,763
183. 1.802 17,715.481 ↑ 516.7 8,583 1

Unique (cost=2,894,881.93..2,994,673.10 rows=4,435,163 width=1,092) (actual time=17,712.244..17,715.481 rows=8,583 loops=1)

  • Output: items_19.id, items_19.type, items_19.ticket_id, items_19.author_type, items_19.author_id, items_19.body, items_19.created_at, items_19.updated_at
  • Buffers: shared hit=9,217,763
184. 7.525 17,713.679 ↑ 516.7 8,583 1

Sort (cost=2,894,881.93..2,905,969.84 rows=4,435,163 width=1,092) (actual time=17,712.243..17,713.679 rows=8,583 loops=1)

  • Output: items_19.id, items_19.type, items_19.ticket_id, items_19.author_type, items_19.author_id, items_19.body, items_19.created_at, items_19.updated_at
  • Sort Key: items_19.id, items_19.type, items_19.ticket_id, items_19.author_type, items_19.author_id, items_19.body, items_19.created_at, items_19.updated_at
  • Sort Method: quicksort Memory: 2,229kB
  • Buffers: shared hit=9,217,763
185. 0.857 17,706.154 ↑ 516.7 8,583 1

Append (cost=47,277.98..1,162,169.11 rows=4,435,163 width=1,092) (actual time=7,934.051..17,706.154 rows=8,583 loops=1)

  • Buffers: shared hit=9,217,763
186. 613.876 8,600.488 ↑ 402.8 8,583 1

Hash Semi Join (cost=47,277.98..668,561.84 rows=3,457,397 width=205) (actual time=7,934.049..8,600.488 rows=8,583 loops=1)

  • Output: items_19.id, items_19.type, items_19.ticket_id, items_19.author_type, items_19.author_id, items_19.body, items_19.created_at, items_19.updated_at
  • Hash Cond: (items_19.author_id = social_profiles_5.id)
  • Buffers: shared hit=3,908,374
187. 2,261.205 7,755.745 ↓ 1.3 4,532,940 1

Hash Semi Join (cost=15.49..573,756.20 rows=3,458,896 width=205) (actual time=0.158..7,755.745 rows=4,532,940 loops=1)

  • Output: items_19.id, items_19.type, items_19.ticket_id, items_19.author_type, items_19.author_id, items_19.body, items_19.created_at, items_19.updated_at
  • Hash Cond: (items_19.source_id = sources_11.id)
  • Buffers: shared hit=3,826,657
188. 5,494.441 5,494.441 ↓ 1.1 4,532,940 1

Index Scan using test_items_authors_social_profile on public.items items_19 (cost=0.43..524,885.03 rows=3,952,723 width=209) (actual time=0.030..5,494.441 rows=4,532,940 loops=1)

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

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

  • Output: sources_11.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
190. 0.085 0.085 ↑ 1.0 58 1

Index Only Scan using index_sources_on_id_and_workspace_id on public.sources sources_11 (cost=0.27..14.34 rows=58 width=4) (actual time=0.010..0.085 rows=58 loops=1)

  • Output: sources_11.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
191. 1.200 230.867 ↑ 295.0 3,423 1

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

  • Output: social_profiles_5.id
  • Buckets: 1,048,576 Batches: 1 Memory Usage: 8,313kB
  • Buffers: shared hit=81,717
192. 0.728 229.667 ↑ 295.0 3,423 1

Nested Loop (cost=34,636.04..34,640.87 rows=1,009,730 width=4) (actual time=214.075..229.667 rows=3,423 loops=1)

  • Output: social_profiles_5.id
  • Buffers: shared hit=81,717
193. 2.923 215.247 ↓ 342.3 3,423 1

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

  • Output: client_users_20.id, client_users_21.id, custom_field_values_10.binded_key
  • Group Key: client_users_20.id
  • Buffers: shared hit=68,005
194. 6.945 212.324 ↓ 342.3 3,423 1

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

  • Output: client_users_20.id, client_users_21.id, custom_field_values_10.binded_key
  • Workers Planned: 3
  • Workers Launched: 3
  • Buffers: shared hit=68,005
195. 128.132 205.379 ↓ 285.3 856 4 / 4

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

  • Output: client_users_20.id, client_users_21.id, custom_field_values_10.binded_key
  • Hash Cond: (client_users_20.id = client_users_21.id)
  • Buffers: shared hit=67,210
  • Worker 0: actual time=43.442..200.641 rows=765 loops=1
  • Buffers: shared hit=16,425
  • Worker 1: actual time=57.223..205.737 rows=965 loops=1
  • Buffers: shared hit=16,996
  • Worker 2: actual time=51.948..206.197 rows=612 loops=1
  • Buffers: shared hit=15,511
196. 50.983 50.983 ↑ 1.3 331,568 4 / 4

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

  • Output: client_users_20.id, client_users_20.created_at, client_users_20.updated_at, client_users_20.terms_of_service, client_users_20.client_code, client_users_20.pool, client_users_20.email, client_users_20.unconfirmed_email, client_users_20.confirmation_token, client_users_20.confirmed_at, client_users_20.confirmation_sent_at, client_users_20.notifier, client_users_20.notification_token, client_users_20.notification_token_type, client_users_20.note, client_users_20.bot_routing, client_users_20.approved_at
  • Buffers: shared hit=20,109
  • Worker 0: actual time=0.015..53.825 rows=305,511 loops=1
  • Buffers: shared hit=4,646
  • Worker 1: actual time=0.016..52.622 rows=341,471 loops=1
  • Buffers: shared hit=5,217
  • Worker 2: actual time=0.011..59.133 rows=248,207 loops=1
  • Buffers: shared hit=3,732
197. 1.389 26.264 ↑ 191.1 3,423 4 / 4

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

  • Output: client_users_21.id, custom_field_values_10.binded_key
  • Buckets: 1,048,576 Batches: 1 Memory Usage: 8,340kB
  • Buffers: shared hit=47,062
  • Worker 0: actual time=30.627..30.627 rows=3,423 loops=1
  • Buffers: shared hit=11,766
  • Worker 1: actual time=25.673..25.673 rows=3,423 loops=1
  • Buffers: shared hit=11,766
  • Worker 2: actual time=33.661..33.661 rows=3,423 loops=1
  • Buffers: shared hit=11,766
198. 2.293 24.875 ↑ 191.1 3,423 4 / 4

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

  • Output: client_users_21.id, custom_field_values_10.binded_key
  • Buffers: shared hit=47,062
  • Worker 0: actual time=9.778..29.086 rows=3,423 loops=1
  • Buffers: shared hit=11,766
  • Worker 1: actual time=7.662..24.320 rows=3,423 loops=1
  • Buffers: shared hit=11,766
  • Worker 2: actual time=9.761..32.156 rows=3,423 loops=1
  • Buffers: shared hit=11,766
199. 2.446 8.890 ↓ 342.3 3,423 4 / 4

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

  • Output: custom_field_values_10.binded_key
  • Group Key: (custom_field_values_10.binded_key)::integer
  • Buffers: shared hit=3,691
  • Worker 0: actual time=9.701..11.639 rows=3,423 loops=1
  • Buffers: shared hit=923
  • Worker 1: actual time=7.582..8.674 rows=3,423 loops=1
  • Buffers: shared hit=923
  • Worker 2: actual time=9.645..10.958 rows=3,423 loops=1
  • Buffers: shared hit=923
200. 6.444 6.444 ↓ 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_10 (cost=0.42..3.90 rows=10 width=7) (actual time=0.086..6.444 rows=3,423 loops=4)

  • Output: custom_field_values_10.binded_key, (custom_field_values_10.binded_key)::integer
  • Index Cond: ((custom_field_values_10.custom_field_id = '520d1832-0834-4091-bf56-d56f5d6aa389'::uuid) AND (custom_field_values_10.value = 'Business TRE'::text))
  • Heap Fetches: 1,378
  • Buffers: shared hit=3,691
  • Worker 0: actual time=0.089..8.413 rows=3,423 loops=1
  • Buffers: shared hit=923
  • Worker 1: actual time=0.118..6.551 rows=3,423 loops=1
  • Buffers: shared hit=923
  • Worker 2: actual time=0.101..8.339 rows=3,423 loops=1
  • Buffers: shared hit=923
201. 13.692 13.692 ↑ 1.0 1 13,692 / 4

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

  • Output: client_users_21.id
  • Index Cond: (client_users_21.id = (custom_field_values_10.binded_key)::integer)
  • Heap Fetches: 550
  • Buffers: shared hit=43,371
  • Worker 0: actual time=0.005..0.005 rows=1 loops=3,423
  • Buffers: shared hit=10,843
  • Worker 1: actual time=0.004..0.004 rows=1 loops=3,423
  • Buffers: shared hit=10,843
  • Worker 2: actual time=0.006..0.006 rows=1 loops=3,423
  • Buffers: shared hit=10,843
202. 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_5 (cost=0.43..0.50 rows=2 width=8) (actual time=0.004..0.004 rows=1 loops=3,423)

  • Output: social_profiles_5.client_user_id, social_profiles_5.id
  • Index Cond: (social_profiles_5.client_user_id = client_users_21.id)
  • Buffers: shared hit=13,712
203. 715.731 9,104.809 ↓ 0.0 0 1

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

  • Output: items_20.id, items_20.type, items_20.ticket_id, items_20.author_type, items_20.author_id, items_20.body, items_20.created_at, items_20.updated_at
  • Buffers: shared hit=5,309,389
204. 813.577 3,276.958 ↓ 1.3 1,278,030 1

Hash Semi Join (cost=15.49..416,238.56 rows=978,190 width=205) (actual time=0.184..3,276.958 rows=1,278,030 loops=1)

  • Output: items_20.id, items_20.type, items_20.ticket_id, items_20.author_type, items_20.author_id, items_20.body, items_20.created_at, items_20.updated_at
  • Hash Cond: (items_20.source_id = sources_12.id)
  • Buffers: shared hit=1,254,164
205. 2,463.255 2,463.255 ↓ 1.1 1,278,030 1

Index Scan using test_items_authors_client_user on public.items items_20 (cost=0.43..402,406.79 rows=1,117,846 width=209) (actual time=0.032..2,463.255 rows=1,278,030 loops=1)

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

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

  • Output: sources_12.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=58
207. 0.112 0.112 ↑ 1.0 58 1

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

  • Output: sources_12.id
  • Heap Fetches: 57
  • Buffers: shared hit=58
208. 1,278.015 5,112.120 ↓ 0.0 0 1,278,030

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

  • Output: client_users_22.id, client_users_23.id, custom_field_values_11.binded_key
  • Hash Cond: (client_users_22.id = client_users_23.id)
  • Buffers: shared hit=4,055,225
209. 0.015 0.015 ↑ 1.0 1 1

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

  • Output: client_users_22.id
  • Index Cond: (client_users_22.id = items_20.author_id)
  • Heap Fetches: 0
  • Buffers: shared hit=4
210. 1,278.030 3,834.090 ↓ 0.0 0 1,278,030

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

  • Output: client_users_23.id, custom_field_values_11.binded_key
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=4,055,221
211. 0.000 2,556.060 ↓ 0.0 0 1,278,030

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

  • Output: client_users_23.id, custom_field_values_11.binded_key
  • Hash Cond: (client_users_23.id = (custom_field_values_11.binded_key)::integer)
  • Buffers: shared hit=4,055,221
212. 2,556.060 2,556.060 ↑ 1.0 1 1,278,030

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

  • Output: client_users_23.id
  • Index Cond: (client_users_23.id = items_20.author_id)
  • Heap Fetches: 213,577
  • Buffers: shared hit=4,054,299
213. 1.818 5.305 ↓ 342.3 3,423 1

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

  • Output: custom_field_values_11.binded_key
  • Buckets: 4,096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 166kB
  • Buffers: shared hit=922
214. 3.487 3.487 ↓ 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_11 (cost=0.42..3.90 rows=10 width=7) (actual time=0.029..3.487 rows=3,423 loops=1)

  • Output: custom_field_values_11.binded_key
  • Index Cond: ((custom_field_values_11.custom_field_id = '520d1832-0834-4091-bf56-d56f5d6aa389'::uuid) AND (custom_field_values_11.value = 'Business TRE'::text))
  • Heap Fetches: 1,378
  • Buffers: shared hit=922
215. 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.69 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=34
216.          

SubPlan (for Index Only Scan)

217. 0.008 0.080 ↑ 1.0 1 8

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

  • Output: items_1.id, items_1.created_at
  • Buffers: shared hit=32
218. 0.072 0.072 ↑ 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.009..0.009 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
219. 0.008 0.048 ↑ 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.006..0.006 rows=1 loops=8)

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

SubPlan (for Index Only Scan)

221. 0.000 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
222. 0.040 0.040 ↑ 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.005..0.005 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
223. 0.040 0.040 ↑ 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.005..0.005 rows=1 loops=8)

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