Benjamin Crozat avatar

Benjamin Crozat

@benjamincrozat

N+1 database queries are the #1 killer in most Laravel projects.

Have you heard about Model::automaticallyEagerLoadRelationships()?

It can make a big difference.

On my blog's homepage:
→ Without: 38 queries (~24ms)
→ With: 13 queries (~8ms)
Obviously, in a production environment, with heavy tables and substantial traffic, the benefits compound and it's even more impressive.
แบ่งปัน
สำรวจ

TweetCloner

TweetCloner เป็นเครื่องมือสร้างสรรค์สำหรับ X/Twitter ที่ให้คุณโคลนทวีตหรือเธรดใดๆ แปลและรีมิกซ์เป็นเนื้อหาใหม่ และเผยแพร่ซ้ำได้ในไม่กี่วินาที

© 2024 TweetCloner สงวนลิขสิทธิ์