How to sort the two related tables of mongodb?

for example,
A table stores the article status table, such as recording the status field to mark that the article has been published, published successfully, failed, and so on
B table. Store the article data table, for example, there is a field: click rate.

now I need to list the successful release data sorted in descending order of click-through rate. What can I do?

< hr >

it seems to me that this problem is not a problem with the mongodb database. Considering whether to switch to other databases in order to support more complex queries.

Mar.12,2021

learn about anti-paradigm?
MongoDB is created for horizontal scale and high performance. Note that you should avoid using relational models to think about problems in a distributed environment, as this often becomes a performance bottleneck. As far as your problem is concerned, there seems to be no reason to split the data into two tables to store. If the data you mentioned are stored in the same document at the same time, will the problem be solved?

Menu