开发者

Does setting .readonly in queries improve performance?

I am displaying records that will not be updated, so I think it makes sense to mark开发者_如何学Go my queries as readonly.

Will this improve performance?


No, marking the records as readonly is completely useless in this case and will possibly degrade performance because Rails would have to set the readonly flag on each of the objects returned rather than skipping that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜