QUERY PLAN
Limit (cost=156.16..156.18 rows=5 width=255)
-> Sort (cost=156.16..156.18 rows=5 width=255)
Sort Key: s.status, u.pinyin_shortcut, s.target_completed_at, s.updated_at DESC
-> Group (cost=156.07..156.11 rows=5 width=255)
Group Key: s.id, u.id
-> Sort (cost=156.07..156.08 rows=5 width=255)
Sort Key: s.id, u.id
-> Hash Left Join (cost=9.17..156.01 rows=5 width=255)
Hash Cond: (s.head_of = u.id)
-> Seq Scan on tbl_tasks s (cost=0.00..146.82 rows=5 width=248)
Filter: (task_group_id = 204)
-> Hash (cost=7.41..7.41 rows=141 width=7)
-> Seq Scan on tbl_users u (cost=0.00..7.41 rows=141 width=7)