Php connection to multiple databases, timeout issues
Source: Internet
Author: User
Php connects to multiple databases and times out RT. now I have multiple databases, some of which are still on different physical machines, and each database has the same table, now we need to query the centralized display of the same table in each Database. how can we solve this problem? Now I am using a method where every DB is connected and the page is output after query. the speed is very slow in the case of thousands of DBS, and no 504 timeout occurs, php connection to multiple databases, timeout issues
RT. now I have multiple databases, some of which are still on different physical machines and each database has the same table. now I need to query the data displayed in the same table of each database, how can this problem be solved?
Now I am using a method where every DB is connected and the page is output after query. the speed is very slow in the case of thousands of DBS, and no 504 timeout occurs, tutorial-0-online !!
------ Solution --------------------
Remote Database connection is always slow. you can try to use a database service that supports distributed databases instead.
For example, oracle and SQL server
------ Solution --------------------
There are thousands of databases on different physical machines, which will be slow. you can cache the results of the first query, and then the query can be obtained from the cache.
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