NodeJs api with mongoose any request go to another collection efficient
问题 I'm write nodeJs api for app with users and I want for each user to use another mongo collection. I recognize each user with the URL address in the params fields. everything is work fine. But when I go to collection dynamically it's very slow. any one idea how to do this faster? thanks in advance ;) app.js this code do req in 2.5 seconds POST /login 200 2487.531 ms - 206 app.use("/:businessUrl", (req, res, next) => { console.log(req.params.businessUrl); mongoose .connect(process.env.MONGO_URI