MongoDb stores two collections, which have the same structure. Currently, you need to perform paging queries. MongoDb does not support Join-like functions and cannot perform data merging and sorting. Considering using PHP for this feature, we are worried about performance and speed. Ask if there are other... two collections are stored in MongoDb, and the two collections have the same structure.
Currently, you need to perform paging queries. MongoDb does not support Join-like functions and cannot perform data merging and sorting.
Considering using PHP for this feature, we are worried about performance and speed.
Is there any other method? thank you.
Reply content:
MongoDb stores two collections, which have the same structure.
Currently, you need to perform paging queries. MongoDb does not support Join-like functions and cannot perform data merging and sorting.
Considering using PHP for this feature, we are worried about performance and speed.
Is there any other method? thank you.
Although there are other methods, such as directly executing js on mongo to directly filter out unwanted data on the server to reduce the amount of data transferred, it is always a cure.
Like mysql, the join operation should not work in principle. I can only regret that I didn't put it together.
P.S. mysql joins two tables in the memory/out-of-memory storage for both queries and sort at the same time, but this logic is completed by mysqld itself, which is reliable and faster, therefore, it is essentially the same as mongo's remote execution of js. if the table structure cannot be changed, you can write JavaScript with peace of mind.
You can encapsulate a class and sort it by yourself, with average efficiency.
For reference: http://www.cnblogs.com/xinghebuluo/archive/2013/05/29/3105479.html