Node.js LoopBack "include" filter (for joining related tables in mySql)

45 views
Skip to first unread message

anam yasir

unread,
Feb 2, 2019, 5:05:21 AM2/2/19
to node-mysql
Hi,

We are using loopback (i.e. framework of Node.js), with two mysql datasources. We need to query related tables from both the databases (as done in mysql by using joins). This functionality is provided by loopback "include" filter, that apparently joins tables having relation with each other from either db. We can include as much relations as we need (equivalent  to mysql joins across multiple tables). But queries with include are too slow.
 The question is either loopback is joining the tables as intended in mysql or loopback is doing something else (like fetching all tables from database and joining them in javascript or so). We need to know this, in order to optimize the slower queries. Responses in this regard will be highly appreciated.


Thanks 
Reply all
Reply to author
Forward
0 new messages