If work_mem is set at user level by using below statement, assume this gets applied to each query run by this user?
alter user user1 set work_mem=\'64MB\';