Today, I want to settle a debate around which method is faster, Using Laravel Eloquent ORM or running Raw Queries.
Both methods have their advantages. However, its important to realize that Eloquent is much slower than using Laravel Query builder or just running raw queries.
For us to determine which is better for performance, I have created this quick experiment that should demonstrate that using Eloquent can be 20x slower than running raw queries.
The main purpose of this experiment is to measure the execution time of running multiple queries using Laravel Eloquent and Raw Queriers.
I have posted all my code for this experiment on my github account. Feel free to download it and see the results for yourself.
Github: [ Ссылка ]
wanna help support my channel ? buy me a coffee ☕️ [ Ссылка ]
Follow us
Github - [ Ссылка ]
Ещё видео!