I have a huge DB, and I was using findByAttributes() to get the first record of an ordered set, with a joined table. It started failing with a fatal error that I’d maxed out my memory… The fix was to manually add LIMIT 1 to my custom scope.
Seems like it was trying to select 20,000+ rows, join another table, sort the rows, pull them all back into PHP, then just return the first one. Am I correct in understanding that findByAttributes() et al. doesn’t automatically use LIMIT 1? Is there a reason for this?