And locking a row in mysql.
Wadle: I have a typical scenario like Posts HAS MANY Comments where I want to get number of comments for each post. When my posts table is 800K rows and comments 3 million rows. its taking about 7 seconds to run. I also need to sort by count so…