mysql 视图 left join 非常慢

select uuid() AS myid,tu.id AS id,tu.job_number AS job_number,tu.email AS useremail,tu.name AS name,tu.dept AS dept,tu.manger AS manger,tu.status AS status,tu.createDate AS createDate,tu.updateDate AS updateDate,tchk.name AS sysName,tchk.number AS sysNumber,tchk.status AS sysStatus,tchk.createDate AS sysCreateDate,'香港集群账号' AS tableName from (tiw_user tu left OUTER join tiw_clusterHkNum tchk on((tchk.tiwUid = tu.id))) where 1 = 1
union all
select uuid() AS myid,tu.id AS id,tu.job_number AS job_number,tu.email AS useremail,tu.name AS name,tu.dept AS dept,tu.manger AS manger,tu.status AS status,tu.createDate AS createDate,tu.updateDate AS updateDate,tcsz.name AS sysName,tcsz.number AS sysNumber,tcsz.status AS sysStatus,tcsz.createDate AS sysCreateDate,'深圳集群账号' AS tableName from (tiw_user tu left OUTER join tiw_clusterSzNum tcsz on((tcsz.tiwUid = tu.id))) where 1 = 1
union all
select uuid() AS myid,tu.id AS id,tu.job_number AS job_number,tu.email AS useremail,tu.name AS name,tu.dept AS dept,tu.manger AS manger,tu.status AS status,tu.createDate AS createDate,tu.updateDate AS updateDate,tcwh.name AS sysName,tcwh.number AS sysNumber,tcwh.status AS sysStatus,tcwh.createDate AS sysCreateDate,'武汉集群账号' AS tableName from (tiw_user tu left OUTER join tiw_clusterWhNum tcwh on((tcwh.tiwUid = tu.id))) where 1 = 1

说明:(一共用十表union进行连接 代码都是重复)且左右表的数据量相差比较大

在连接上加入索引。
你这sql语句都是一样的,是不是粘错了。