检索性能问题
现在有100万的数据分100张相同的表存储,检索需要按'time' 字段排序显示32000条检索内容。
目前 我使用 union all,如(select * from 'table1' where(...) union all select * from 'table2' where(...) ......union all select * from 'table100' where(...))order by time desc limit 32000;
这样做一次的时间是300秒
有什么办法能检索快一点呢?
貌似索引遇到了分表就没有什么用了,limit 和 order by一起用也没有什么加速作用.
问一下 这句sql语句怎么写才好呢??请各位高手帮帮忙