For this query, you want the following index:
create index myindex on mytable(year, goal_id, target)
This gives you a covering index: all columns that come into play in the query are part of the index, so this gives the database a decent chance to execute the query by looking at the index only (without actually looking at the data).
The ordering of columns in the index is important: the first two columns correspond to the where
predicates, and the last column is the column comes into play in the select
clause.
Depending on the cardinality of your data, you might also want to try to invert the first two columns:
create index myindex on mytable(goal_id, year, target)
The base idea is that you want to put the more restrictive criteria first.