Support the ongoing development of Laravel.io →
Database Eloquent Laravel
0
moderator

Hello @abduruntime ,

For the amount of 20 0000 rows it is a good option to use a chunk or cursor, the best option depends on your query.

To be honest a join is most of the time very inefficient and it can be advisable to see if you can rewrite it to a query that doesn't use joins.

The part about Eloquent, Query Builder or raw is also the order that I advice :)

If possible without problems: Use Eloquent. Else try the Query Builder. If both is not an option then you need to go to a raw query.

What I see in my projects is most of the times a mix from Eloquent and the query builder.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.