简体   繁体   中英

Combining multiple tables in rails it is taking too much time to get the records? How to increase performance in rails?

在我的模型中,我正在应用多种方法,最后将数据作为项目获取。

Project.active_leads(filter_params).city_id(filter_params).date_range(filter_params)

我建议您将其设置为“作用域”并通过Redis对其进行缓存

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM