select t.id ,t.parent, t.name ,t.begin ,t.end , t.ACTUAL_START , t.ACTUAL_FINISH, t.TASK_UNIQUE_NO, t.NO, t.SUMMARY, t.DEPENDENCE, t.PRIORITY, t.EXEC_STAT, t.DURATION, t.COMP_PCT,ASSIGNER,POSITION,PRINCIPAL,PRINCIPAL_NAME,ORG_NAME,MGR_LINE,ERJIGUANXIAN,SFSJYS,SFNDJH, t.CRITICAL,t.PROJ_NO,t.SRC_TID,t.ASSIGNER_AUTH,t.POSITION_NAME,t.ASSIGNER_NAME,t.PRIN_ORG,t.ORG,t.SRC_SYS,t.CREATE_USER, t.TASK_NO,tp.id as typ,tp.name as typname,t.SETTLETYPECODE as SETTLETYPECODE,'' as remark,'' as type,t.OATASKID as OATASKID,t.QIQU,t.DESCRIBE, S.DESCRIPTION,ontheway_type,T.SHIFOUXXJDHB,up.update_date optime,submit,t.AUDITOR,t.AUDITOR_NO,t.proj_name,tp.filter_type,t.plan,t.MATTER_SRC,t.Prepose_task,t.shixiangbiaoqian, t.SETTLE_LEVEL,tp.specail_name,t.audit_unit,t.rectify_question_type,t.project_data_processor,t.project_data_processor_name, CASE WHEN t.EXEC_STAT not IN ('30','31','32','33','34','41','55') and ( up.STAT = 'OP' or up.STAT = 'I') then 'relay' when t.EXEC_STAT not IN ('30','31','32','33','34','41','55') and up.STAT = 'U' and up.FINISH ='Y' and up.rel = '1' AND up.RID is not null then 'finish' when t.EXEC_STAT not IN ('30','31','32','33','34','41','55') and up.STAT = 'U' and up.DELAY ='Y' and up.rel = '1' AND up.RID is not null then 'delay' when t.EXEC_STAT not IN ('30','31','32','33','34','41','55') and up.STAT = 'U' and up.TERMINATE ='P' and up.rel = '1' AND up.RID is not null then 'terminate' else null end as approve_type, up.user_id as approver from t_master_task t left join t_task_2_task_typ p on t.id = p.task left join t_task_typ tp on tp.id = p.typ left join t_slave_task s on s.id=t.id left join (select * from (select a.*,row_number() over(partition by task order by update_date desc) rm from t_user_task_upd_stat a) where rm = 1) up on t.id = up.task; 这sql怎么优化