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 كل الحقوق محفوظة.