Support the ongoing development of Laravel.io →
posted 10 years ago
Eloquent
Last updated 2 years ago.
0

If you want to use relations, the first method is the way to go. I dont know how large the query becomes, but it doesnt have to be a problem. Use something like Clockwork to check the timings on the query. I have some pretty large queries like this in one of my projects, and it's very fast.

SELECT * FROM "attributes" WHERE "attributes"."container_id" in (... about 300 ids .. )

This took 3ms.

Last updated 2 years ago.
0

Thanks!!

But I'm still curious about if it is possible (in mysql) to build a very very long query (maybe with 1000 or more ids? ).

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jasteralan jasteralan Joined 20 Apr 2014

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.