If the merged data under each sub-library is displayed after the sub-library is divided

  mysql, question

B2C e-commerce, if there is a user list, an order list and a commodity list, after hash is carried out for the user ID, it is divided into four databases, i.e. a, b, c and d, the orders placed by different users are also stored in the corresponding a, b, c and d databases, and the commodity list is stored redundantly in all databases.
If you want to see all the orders in the backstage order inside, what should you do at this time? Combine the orders of A, B, C and D and sort them again? Does this set of rules have components that can be implemented? Or do you want to write your own code?

The structure of the order form is the same. It is recommended to process it at the database level. sql statement union is used to query it jointly, and then order by and limit are processed. The program side directly obtains the processed data. Code Resolution Will Eat Memory