What would be the best way to fetch the 5 latest/recent documents from the database?
Right now I'm ordering them by date but it requires fetching all the documents from the clients browser, and then ordering them by date. Kind of complicaed and bloated 😦
TL;DR
The user is asking for the best way to fetch the 5 latest documents from the database. Currently, they are ordering the documents by date but it requires fetching all the documents from the client's browser and then ordering them. This is complicated and bloated. The suggested solution is to pass queries to order by date and limit to 5.