阅读背景:

如何快速检查数据库中是否存在大量记录?

来源:互联网 

At some point in my Rails application, I retrieve a large number of ActiveRecord objects from the cache. However, it's possible that some of these records have been deleted from the database itself since they were stored in the cache, so I loop the records and check each one to see if it exists. This takes quite a lot of time. Is there a more efficient way to do this?At some point in my Rails application, I retrie




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: