优化前
SELECTuser_id,user_name,real_name,PASSWORD,real_org_id,real_org_name,real_dept_id,real_dept_name,
STATUS
FROMsys_user
WHEREis_del = 0 AND find_in_set( 'lilong', login_user_account )
优化后
SELECTuser_id,user_name,real_name,PASSWORD,real_org_id,real_org_name,real_dept_id,real_dept_name,
STATUS
FROMsys_user
WHEREuser_id =(SELECTuser_id FROMsys_user WHEREis_del = 0 AND FIND_IN_SET( 'lilong', login_user_account ) LIMIT 0,1
)
优化后,将查询改为子查询速度快了不少(数据量越大,效果越明显)