Answer the question
In order to leave comments, you need to log in
How to optimize WHERE IN in a query when there are a lot of values?
Good day. I ask for help in solving my problem.
SELECT `price`,`currency`,`status` FROM `orders` WHERE `currency` = $currency AND `date_add` >= $q[0] AND `date_add` <= $q[1] AND `user_id` IN ($ids)
Answer the question
In order to leave comments, you need to log in
JOIN users ON users.id = orders.user_id
WHERE ... AND users.partner_id = $partner_id
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question