| Aggregate (cost=173.07..173.08 rows=1 width=8) |
| -> Sort (cost=172.50..172.60 rows=38 width=222) |
| Sort Key: s.created_at DESC |
| -> HashAggregate (cost=171.12..171.50 rows=38 width=222) |
| Group Key: s.id |
| -> Hash Right Join (cost=155.22..170.03 rows=437 width=12) |
| Hash Cond: (turs.task_group_id = s.id) |
| -> Seq Scan on tbl_task_group_user_relationships turs (cost=0.00..7.94 rows=494 width=4) |
| -> Hash (cost=154.21..154.21 rows=81 width=12) |
| -> Nested Loop (cost=140.57..154.21 rows=81 width=12) |
| -> Seq Scan on tbl_users u (cost=0.00..8.16 rows=1 width=4) |
| Filter: ((id = 1000) AND (department_id = 10)) |
| -> Hash Left Join (cost=140.57..145.24 rows=81 width=16) |
| Hash Cond: (s.client_id = client.id) |
| Filter: ((lower((client.name)::text) ~~ '%2%'::text) OR (client.pinyin_shortcut ~~ '%2%'::text) OR (lower((s.title)::text) ~~ '%2%'::text) OR (lower(s.description) ~~ '%2%'::text)) |
| -> Hash Right Join (cost=6.61..11.07 rows=81 width=126) |
| Hash Cond: (thrs.task_group_id = s.id) |
| -> Seq Scan on tbl_task_group_head_of_relationships thrs (cost=0.00..3.93 rows=193 width=4) |
| -> Hash (cost=6.14..6.14 rows=38 width=126) |
| -> Seq Scan on tbl_task_groups s (cost=0.00..6.14 rows=38 width=126) |
| Filter: (head_of = 1000) |
| -> Hash (cost=108.98..108.98 rows=1998 width=59) |
| -> Seq Scan on tbl_clients client (cost=0.00..108.98 rows=1998 width=59) |
| Filter: (NOT deleted) |