如何使用 EXISTS 而不是 IN 函数优化以下 mysql 查询?
Subscriber.first(:conditions => ["email IN(SELECT email from submissions WHERE url = ? AND confirmed != 0)", url], :order => "RANDOM()")
感谢帮助!
如何使用 EXISTS 而不是 IN 函数优化以下 mysql 查询?
Subscriber.first(:conditions => ["email IN(SELECT email from submissions WHERE url = ? AND confirmed != 0)", url], :order => "RANDOM()")
感谢帮助!