PHP connection multiple db, time-out related issues

Source: Internet
Author: User
PHP connection multiple db, time-out problem
RT, now I have multiple libraries, some are on different physical machines, each library has the same table, now need to query each library the same table data set display, how to solve this problem?
Now I use the method is each DB to establish a connection, query and then output the page, thousands of DB case is very slow, and there is no 504 timeout situation, ask-0-, online and so on!!
------Solution--------------------
The remotely connected database is always slow, and you can try to use a database service that supports distributed databases instead
such as Oracle, SQL Server
------Solution--------------------
On different physical machines, there are also thousands of db, which is sure to be slow, you can cache the results of the first query, and then the query can be retrieved from the cache.
  • 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.