Summary: | anonymise_issue_history can be very slow on large systems | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Kyle M Hall (khall) <kyle> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, julian.maurice, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 16966, 19830 | ||
Bug Blocks: | |||
Attachments: |
Bug 19599: Execute 1 query per patron
Bug 19599: Simplify the query Bug 19599: Execute 1 query per patron Bug 19599: Speed anonymise_issue_history up Bug 19599: Speed anonymise_issue_history up |
Description
Nick Clemens (kidclamp)
2017-11-09 11:54:50 UTC
Created attachment 69052 [details] [review] Bug 19599: Execute 1 query per patron Created attachment 69054 [details] [review] Bug 19599: Simplify the query Nick, can you compare these 2 approaches please? They are not dependent on each others. Created attachment 69778 [details] [review] Bug 19599: Execute 1 query per patron Signed-off-by: Nick Clemens <nick@bywatersolutions.com> (In reply to Jonathan Druart from comment #3) > Nick, can you compare these 2 approaches please? > They are not dependent on each others. The first approach is much faster on a large dataset. The second can generate a very long query, I think one per patron works best. Signed off and obsoleted second patch koha-qa complains: FAIL Koha/Patron.pm FAIL pod coverage POD is missing for old_checkouts Created attachment 69860 [details] [review] Bug 19599: Speed anonymise_issue_history up The query generated by anonymise_issue_history is unecessary complex and can be very slow on large DB. With this patch we will execute one query per patron instead. See patch "Bug 19599: Simplify the query" on the bug report for an alternative. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> I have moved the code creating Koha::Patron->old_checkouts to its own bug report (bug 19830). Created attachment 69999 [details] [review] Bug 19599: Speed anonymise_issue_history up The query generated by anonymise_issue_history is unecessary complex and can be very slow on large DB. With this patch we will execute one query per patron instead. See patch "Bug 19599: Simplify the query" on the bug report for an alternative. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 18.05, thanks to everybody involved! Awesome work all! Pushed to stable for 17.11.02 Depends on Bug 19830 that is not in 17.05.x (In reply to Fridolin SOMERS from comment #12) > Depends on Bug 19830 that is not in 17.05.x I've changed my mind and push to 17.05.x for v17.05.08 I think not needed for 16.11.x because does not contain Bug 16966 |