有3个结构几乎一样的表,需要从3个表中查询数据,每个表大概有几万条数据,用下面的查询语句,耗时在5秒以上,请问有什么办法可以提高查询效率
SELECT * FROM(
SELECT id,title,inputtime,description,url,thumb,status FROM sc_news
UNION
SELECT id,title,inputtime,description,url,thumb,status FROM sc_pic
UNION
SELECT id,title,inputtime,description,url,thumb,status FROM sc_video
) AS a
WHERE a.title like '%中国%'
3张表是无关联的,所以采用 UNION 方法