QUERY PLAN
Group (cost=18.05..18.07 rows=1 width=35)
Group Key: u.pinyin1, u.namecut1, u.pinyin2, u.namecut2, u.pinyin3, u.namecut3, u.pinyin4, u.namecut4, urcl.user_id
-> Sort (cost=18.05..18.05 rows=1 width=35)
Sort Key: u.pinyin1 NULLS FIRST, u.namecut1 NULLS FIRST, u.pinyin2 NULLS FIRST, u.namecut2 NULLS FIRST, u.pinyin3 NULLS FIRST, u.namecut3 NULLS FIRST, u.pinyin4 NULLS FIRST, u.namecut4 NULLS FIRST, urcl.user_id
-> Hash Right Join (cost=10.09..18.04 rows=1 width=35)
Hash Cond: (u.id = urcl.user_id)
-> Seq Scan on tbl_users u (cost=0.00..7.41 rows=141 width=35)
-> Hash (cost=10.07..10.07 rows=1 width=4)
-> Seq Scan on tbl_user_role_change_logs urcl (cost=0.00..10.07 rows=1 width=4)
Filter: (((start_from < end_at) OR (end_at IS NULL)) AND ((role_name)::text = 'AccountManager'::text) AND (tsrange((start_from)::timestamp without time zone, (end_at)::timestamp without time zone, '[)'::text) && '["2025-01-01 00:00:00","2025-12-31 23:59:59"]'::tsrange))