union all效率低下,该用存储过程、视图、临时表哪种方法来解决?该如何解决

WBOY
Release: 2016-06-13 12:49:44
Original
1092 people have browsed it

union all效率低下,该用存储过程、视图、临时表哪种方法来解决?
union all效率低下,大概union all数十张表,单表select仅需0.0003-0.002秒,但union all后需要0.6秒左右
想改善下效率

这种情况该用存储过程、视图、临时表哪种方法来解决?


------解决方案--------------------
数据量有多大啊?要达到分表的情况下了。分表的话,这种水平分也不合理吧。
------解决方案--------------------
union all 之后还做了order之类? 要不不该差这么大啊
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!