-
-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
In the docs for eager-loading https://github.com/fukamachi/mito#eager-loading I noticed that the queries are:
;-> ;; SELECT * FROM `tweet` WHERE (`status` LIKE ?) ("%Japan%") [3 row] | MITO.DB:RETRIEVE-BY-SQL
;-> ;; SELECT * FROM `user` WHERE (`id` IN (?, ?, ?)) (1, 3, 12) [3 row] | MITO.DB:RETRIEVE-BY-SQLBut really this is inefficient since it's causing two queries, it should really be handled as a LEFT JOIN to be one query instead of two and it should be:
SELECT * FROM `tweet` WHERE (`status` LIKE ?) ("%Japan%") LEFT JOIN `user` ON `user`.ID = `tweet`.ID;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels