1、 MySql LeapBestApp MySql count sum min max avg group by N+1 Client.limit(10).each do |client| puts client.address.postcode end 11 clients 1 addresses 10 SELECT * FROM clients LIMIT 10 SELECT addresses.* FROM addresses WHERE addresses.client_id = 1 SELECT addresses.* FROM addresses WHERE addresses.cl
2、ient_id = 10 Client.includes(:address).limit(10).each do |client| puts client.address.postcode end clients 1 addresses 1 SELECT * FROM clients LIMIT 10 SELECT addresses.* FROM addresses WHERE (addresses.client_id IN (1,2,3,4,5,6,7,8,9,10) 300 100W 500w 20 40 varchar 4000 20000 TEXT DATE DATETIME null ENUM VARCHAR where order by NULL SQL where orders user_id product_id depot_id where user_id SQL select * from CPU select a,b,c from like (%xxx) (xxx%)