DEV Community

Gunabalan.S
Gunabalan.S

Posted on • Edited on

ORM vs SQL vs query builder

ORM may initially provide a comfortable development experience, but its efficiency diminishes when dealing with a user base as small as 10,000. The slowdown becomes noticeable, especially with multiple joins or lengthy logic. In my personal experience with Laravel PHP projects, I opted to move away from ORM.

While direct SQL introduces challenges, such as data marshaling between JSON and objects or the serialization and de-serialization process, using query builders like Medoo PHP proved to be a wise choice. These tools are lightweight and alleviate some of the burdens, allowing for a smoother development process.

However, in situations where extensive processing is required, like generating invoices for over 10,000 users, employing stored procedures becomes a preferable solution.

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay