On Fri, Aug 24, 2012 at 9:12 AM, kirill <
kmat...@mgcom.ru> wrote:
> The problem is that database freezes when i run it.
That sounds like a different problem. Or maybe it's just a really
slow query due to database size and available memory and other server
resources?
> But when i copy the query and manually run it in mysql console adding '
> limit 10;' it gives me the right results in "0.00 sec".
Why are you explicitly disabling the subselect limit? Does MySQL not
support it?
> The only option i have is to generate sql into a string and then manually
> append limits i need?
That query would be incorrect. You'd be limiting it to 10 rows, not
10 Offers. If the first Offer has 7 associated MarketBidsRecommended
objects and the second has 5, a "LIMIT 10" clause on the query would
result in one Offer with its 7 associated MarketBidsRecommended
objects and a second Offer with 3 of its 5 associated
MarketBidsRecommended objects.
-John