N+1 query సమస్య — loop లో relationships ను access చేసేటప్పుడు ప్రతి record కు ఒక్క separate query ట్రిగ్గర్ అవుతుంది — ఇది అత్యంత సాధారణ Eloquent performance సమస్య. Eager loading with() తో అనేక ఆప్టిమైజేషన్ల (columns selection, chunking, indexing) తో కలిపి ప్రధాన సరిదిద్దుకోవటం.
N+1 సమస్య మరియు దాని సరిదిద్దుకోవటం
= ::();
( ) {
->author->name;
}
= ::()->();
( ) {
->author->name;
}
