Summary: | action_logs table needs some thought | ||
---|---|---|---|
Product: | Koha | Reporter: | Galen Charlton <gmcharlt> |
Component: | Database | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | abl, colin.campbell, fridolin.somers, mathsabypro |
Version: | Main | ||
Hardware: | PC | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | |||
Bug Blocks: | 7923 | ||
Attachments: |
Bug 3445 - action_logs table needs indexes
[PATCH]SIGNED OFF Bug 3445 - action_logs table needs indexes [PASSED QA] Bug 3445 - action_logs table needs indexes |
Description
Chris Cormack
2010-05-21 01:10:35 UTC
The table structure doesn't show columns for borrowernumber, biblionumber etc. but this might be quite hard to implement right now. Also no indexes for user, module, action, etc. Created attachment 23024 [details] [review] Bug 3445 - action_logs table needs indexes [2] patch adding indexes to action_logs This is important because without db indexes, using log viewer may block the database for a moment. In some cases, action_logs table has more than a million rows. Also this may be a bug more than an enhancement. It needed a little rebase in updatedatabase, but it works. I sign off. Mathieu Created attachment 23222 [details] [review] [PATCH]SIGNED OFF Bug 3445 - action_logs table needs indexes Not sure if that's too many indexes, but it works as expected :) Created attachment 23866 [details] [review] [PASSED QA] Bug 3445 - action_logs table needs indexes This patch adds database indexes for action_logs table to speed up "log viewer" page. Removes the existing index on timestamp+user to add an indexe on each column since earch colums is separately defined in log viewer form. Test plan: - Update database - Play with log viewer : /cgi-bin/koha/tools/viewlog.pl - Perform searches with only one filter defined - Also check you see indexes with SQL query : SHOW CREATE TABLE action_logs Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Rephrased the updatedatabase message a bit: Add indexes to action_logs table Passes all tests and QA script. Pushed to master. Thanks, Fridolin! Pushed to 3.14.x, will be in 3.14.07 |