I am displaying records that will not be updated, so I think it makes sense to mark my queries as readonly.
Will this improve performance?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.