Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Reduces speed when used in an includes #1

hlogmans opened this Issue · 3 comments

3 participants


If I do something like 'Articles.includes(:contentitems)', where contentitems has lazy loaded columns, the resulting query is like: 'select contentitems.[nonlazy columns], contentitems.* from contentitems', which of course even further degrades performance. I looked at the source if I could alter its behaviour, but I don't understand enough how these includes pull their columns...

(I tested two other gems doing something alike and those work neither)


Hi @hlogmans,

Thanks for reporting this issue. I will look into it. I am not sure I can fix it with the current approach but this is something that should be fixed anyway.


I believe this is a bug with default_scope combined with includes in Rails: rails/rails#785


Indeed @GUI. Thanks a lot for the info. I'm glad that at least it is tracked. I will try to see how to fix that in Rails. There seem to be an old patch that was never included in Rails.

@jorgemanrubia jorgemanrubia was unassigned by hlogmans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.