Created
April 8, 2011 08:44
-
-
Save petyosi/909506 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A.count # ~ 2000 | |
# in 3.0.4 this was very fast, although loading 2000k records - they had only one field loaded anyway. | |
# but in 3.0.6 this jumped from 1k ms to 15k ms. | |
A.includes(:b => :c).where('c.active').select('distinct field').map(&:field) | |
# fixed with something like that | |
A.joins(:b => :c).where('c.active').select('distinct field').map(&:field) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment