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, tutorial-0-online !!
Reply to discussion (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
Mysql is used in the project. because the product is already external, it cannot be implemented for the time being .. Is there any better solution to this problem?
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.