| Aggregate (cost=419.05..419.06 rows=1 width=8) |
| -> Sort (cost=419.03..419.03 rows=1 width=285) |
| Sort Key: c.start_at DESC NULLS LAST, c.created_at DESC |
| -> HashAggregate (cost=419.01..419.02 rows=1 width=285) |
| Group Key: c.id |
| -> Nested Loop (cost=328.26..418.22 rows=315 width=20) |
| -> Seq Scan on tbl_engineer_group_relationships egr (cost=0.00..40.60 rows=1 width=4) |
| Filter: ((engineer_id = 5495) AND (engineer_group_id = 1)) |
| -> Hash Right Join (cost=328.26..374.47 rows=315 width=24) |
| Hash Cond: (sgr.sales_id = c.deduct_points_from) |
| -> Seq Scan on tbl_sales_group_relationships sgr (cost=0.00..30.40 rows=2040 width=4) |
| -> Hash (cost=327.89..327.89 rows=30 width=28) |
| -> Hash Right Join (cost=273.16..327.89 rows=30 width=28) |
| Hash Cond: (cccr.case_id = c.id) |
| Filter: ((c.deduct_points_from = 5493) OR (c.deduct_points_from IS NULL) OR (c.last_engineer = 5495) OR (crr.user_id = 5495) OR (hashed SubPlan 1) OR (cccr.user_id = 5495) OR (c.created_by = 5495)) |
| -> Seq Scan on tbl_case_carbon_copy_rels cccr (cost=0.00..30.40 rows=2040 width=8) |
| -> Hash (cost=237.55..237.55 rows=7 width=40) |
| -> Hash Right Join (cost=199.43..237.55 rows=7 width=40) |
| Hash Cond: (crr.remind_date_id = crd.id) |
| -> Seq Scan on tbl_case_remind_receivers crr (cost=0.00..30.40 rows=2040 width=8) |
| -> Hash (cost=199.35..199.35 rows=6 width=40) |
| -> Hash Right Join (cost=166.47..199.35 rows=6 width=40) |
| Hash Cond: (crd.case_id = c.id) |
| -> Seq Scan on tbl_case_remind_dates crd (cost=0.00..26.60 rows=1660 width=8) |
| -> Hash (cost=166.46..166.46 rows=1 width=36) |
| -> Hash Right Join (cost=126.97..166.46 rows=1 width=36) |
| Hash Cond: (tghr.task_group_id = tg.id) |
| Filter: ((tgur.user_id = 5495) OR (tghr.user_id = 5495)) |
| -> Seq Scan on tbl_task_group_head_of_relationships tghr (cost=0.00..30.40 rows=2040 width=8) |
| -> Hash (cost=126.75..126.75 rows=17 width=44) |
| -> Hash Right Join (cost=88.53..126.75 rows=17 width=44) |
| Hash Cond: (tgur.task_group_id = tg.id) |
| -> Seq Scan on tbl_task_group_user_relationships tgur (cost=0.00..30.40 rows=2040 width=8) |
| -> Hash (cost=88.50..88.50 rows=3 width=40) |
| -> Hash Right Join (cost=68.57..88.50 rows=3 width=40) |
| Hash Cond: (cb.case_id = c.id) |
| -> Seq Scan on tbl_callback_records cb (cost=0.00..17.20 rows=720 width=4) |
| -> Hash (cost=68.55..68.55 rows=1 width=40) |
| -> Nested Loop Left Join (cost=38.40..68.55 rows=1 width=40) |
| -> Nested Loop Left Join (cost=38.25..60.34 rows=1 width=40) |
| -> Hash Right Join (cost=38.11..51.42 rows=1 width=40) |
| Hash Cond: (ps.case_id = c.id) |
| -> Seq Scan on tbl_pre_sales ps (cost=0.00..12.40 rows=240 width=4) |
| -> Hash (cost=38.10..38.10 rows=1 width=40) |
| -> Hash Right Join (cost=26.44..38.10 rows=1 width=40) |
| Hash Cond: (iri.implement_record_id = i.id) |
| -> Seq Scan on tbl_implement_items iri (cost=0.00..11.20 rows=120 width=4) |
| -> Hash (cost=26.43..26.43 rows=1 width=44) |
| -> Hash Right Join (cost=13.26..26.43 rows=1 width=44) |
| Hash Cond: (i.case_id = c.id) |
| -> Seq Scan on tbl_implement_records i (cost=0.00..12.50 rows=250 width=8) |
| -> Hash (cost=13.25..13.25 rows=1 width=44) |
| -> Seq Scan on tbl_cases c (cost=0.00..13.25 rows=1 width=44) |
| Filter: ((task_group_id IS NOT NULL) AND (last_engineer = 5495)) |
| -> Index Only Scan using tbl_clients_pkey on tbl_clients client (cost=0.14..8.15 rows=1 width=4) |
| Index Cond: (id = c.client_id) |
| -> Index Only Scan using tbl_task_groups_pkey on tbl_task_groups tg (cost=0.15..8.17 rows=1 width=4) |
| Index Cond: (id = c.task_group_id) |
| SubPlan 1 |
| -> Seq Scan on tbl_user_visit_clients (cost=0.00..35.50 rows=10 width=4) |
| Filter: (user_id = 5495) |