Unionall is inefficient. which method should be used to solve the problem of stored procedures, views, and temporary tables? How to solve

Source: Internet
Author: User
Unionall is inefficient. which method should be used to solve the problem of stored procedures, views, and temporary tables? Union & nbsp; all is inefficient. The union & nbsp; all has dozens of tables. The select statement for a single table takes only 0.0003-0.002 seconds, but union & nbsp; it takes about 0.6 seconds after all to improve efficiency. in this case, which of the following solutions should I use stored procedures, views, and temporary tables? Union all is inefficient. Which of the following solutions should we use stored procedures, views, and temporary tables?
Union all is inefficient. It takes about 0.0003-0.002 seconds to select a single table with dozens of union all tables, but it takes about 0.6 seconds after union all.
To improve efficiency

In this case, which of the following methods should be used to solve the problem?


------ Solution --------------------
How big is the data volume? When the number of sub-tables is reached. This horizontal score is not reasonable for table sharding.
------ Solution --------------------
After union all, order and so on? Shouldn't it be so big?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.