http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9811 --- Comment #43 from Jonathan Druart <jonathan.druart@biblibre.com> --- I am not able to reproduce Owen and Chris issues. (In reply to Owen Leonard from comment #33)
I just tried this out with a copy of our production database of patrons (62,000+ records) and I don't get any results.
When I first load the page it looks like the table is trying to process *all* patron records? The POST response has this:
"iTotalRecords": 62459, "iTotalDisplayRecords": 62459,
...but they are never displayed. I don't get any results from clicking on the "browse by last name" alphabet links, and I don't get any results after performing a simple search by last name. In all cases I see the "processing" message on the screen but nothing is ever displayed.
Without any errors in your koha logs (or js error)? (In reply to Chris Cormack from comment #40)
I think you may be misunderstanding, these patches add datatables, but they also change the behaviour so when you visit the members page it fetches every single borrower from the database. This is not acceptable, hence the failed qa, nor will an index fix it. It either needs to be rewritten to lazy load, or to not fetch all borrowers, or some other fix
This patch normally does that! :) Of course, the goal of this patch is to retrieve only the xx first results, not all. After applying these patches, I go on members/members-home.pl and the generated sql query is: SELECT borrowers.borrowernumber, borrowers.surname, borrowers.firstname, borrowers.address, borrowers.address2, borrowers.city, borrowers.zipcode, borrowers.country, CAST(borrowers.cardnumber AS UNSIGNED) AS cardnumber, borrowers.dateexpiry, borrowers.borrowernotes, borrowers.branchcode, categories.description AS category_description, categories.category_type, branches.branchname FROM borrowers LEFT JOIN branches ON borrowers.branchcode = branches.branchcode LEFT JOIN categories ON borrowers.categorycode = categories.categorycode ORDER BY borrowers.surname asc,borrowers.firstname asc LIMIT 0,20 The limit clause exists! You can display this query in the log, warning the $query var in C4::Utils::DataTables::Members l.102. Maybe the executing time issue is caused by the 2 COUNT(*) queries. But since we don't want the "SELECT SQL_CALC_FOUND_ROWS" mysqlism, I don't know how we can do that on a different way. I will submit a patch replacing the count(*) with count(borrowers.borrowernumber), but I am not sure it could be useful. -- You are receiving this mail because: You are watching all bug changes.