Database

Common Problem

N+1 query

let's say you have two model

User {
}

User has_many Post

CreditCardInfo {
    
}

CreditCardInfo belongs_to User

maybe sometimes you want User info and CreditCardInfo together

if you doing this law query

Last updated

Was this helpful?