QUERY PLAN
Sort (cost=10.57..10.58 rows=1 width=58)
Sort Key: u.pinyin1, u.namecut1, u.pinyin2, u.namecut2, u.pinyin3, u.namecut3, u.pinyin4, u.namecut4
-> Group (cost=10.55..10.56 rows=1 width=58)
Group Key: u.id, sg.y_budget, sg.y_profit
-> Sort (cost=10.55..10.55 rows=1 width=54)
Sort Key: sg.y_budget, sg.y_profit
-> Nested Loop Left Join (cost=0.00..10.54 rows=1 width=54)
Join Filter: (sgr.user_id = u.id)
-> Seq Scan on tbl_users u (cost=0.00..7.80 rows=1 width=44)
Filter: (id = 1001)
-> Nested Loop (cost=0.00..2.73 rows=1 width=14)
Join Filter: (sgr.sales_goal_id = sg.id)
-> Seq Scan on tbl_sales_goals sg (cost=0.00..1.16 rows=1 width=14)
Filter: ((id IS NOT NULL) AND (goal_year = '2026'::smallint))
-> Seq Scan on tbl_sales_goal_rels sgr (cost=0.00..1.54 rows=2 width=8)
Filter: (user_id = 1001)