请教一个sql语句的优化问题
select a,b,c,d,e from table1 where a like '%a%'
union
select a,b,c,d,e from table2 where a like '%a%'
union
select a,b,c,d,e from table3 where a like '%a%'
union
select a,b,c,d,e from table4 where a like '%a%'
我查了2万条记录 用了12秒 我把这个a字段加了索引 但是好象 like '%a%' 这种形式的表达式是不能被索引的 我应该怎么做才能优化这个sql语句啊 谢谢