https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35361
David Cook <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #6 from David Cook <[email protected]> --- (In reply to Andreas Jonsson from comment #0) > The search filter for the table on the page acqui/parcel.pl generates the > below api-request, which results in the below sql query. Note how the LIMIT > clause is applied to the sub-query, not the whole query. For us, this > specific query actually yielded a search result of in total over 171 000 > rows. This particular query here does seem hypothetical rather than practical. The size of the query does make it difficult to boil down. It looks like your vendor must have a large number of orders. In theory, that LIMIT 20 should limit the results, but there are a lot of JOINs across different tables, so you could end up with some unexpected results I suppose... (In reply to Andreas Jonsson from comment #2) > Do we have a plan to move away from DBIx? No, Koha is in deep with DBIx. (In reply to Andreas Jonsson from comment #4) > Replacing "prefetch" with "join" actually solves this problem. Why are we > using "prefetch"? This is what the documentation has to say: > > "Prefetch does a lot of deep magic. As such, it may not behave exactly as > you might expect." > > On the other hand, the documentation also says: > > "..., only the prefetch technique will deal sanely with fetching related > objects over a has_many relation. " Koha does some interesting generic handling of search queries that get translated into DBIx queries. It might be that Koha is doing something wrong as well. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
