- You can club all three queries into a SQL script and use the ‘executeSQLScript’ function. In this way there is no need to call multiple fetch () calls.
- If you are using relational database, then make sure you have used suitable indexing.
- For speed up you can try switching to columnar database if queries are related to analytics or to NoSQL database if your database is unstructured.
- https://www.mathworks.com/help/database/ug/mongoc.html
- https://www.mathworks.com/help/database/columnar-database.html