[Bug 18441] New: add primary, foreign keys to statistics table
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18441 Bug ID: 18441 Summary: add primary, foreign keys to statistics table Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: barton@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com I think that the primary key would be useful for Bug 9717 'localuse recorded for holds/transfers' -- we could record 'localuse' when the item is checked in, and then update the statistics record to 'holdcaptured' or 'transferred' if the check-in captures a hold or completes a branch transfer. The statistics table is *very* slow to join borrowers or items against, because borrowernumber and itemnumber are not indexed. It also caused a 12 hour run of updatedatabase on site that had a large statistics table, when running the upgrade that fixed bug 14598 (itemtype is not set on statistics by C4::Circulation::AddReturn). This occurred on the 16.06.00.039 update. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18441 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |5334 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5334 [Bug 5334] Omnibus: Add explicit foreign key constraints -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18441 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lari.taskula@hypernova.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18441 --- Comment #1 from Lari Taskula <lari.taskula@hypernova.fi> --- +1 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18441 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think sometimes it's really useful that the entries are not all 'NULLed' on deletion of an item, borrower or staff user. Especially with our current 2 table setup. I often have to dig in statistics and action_logs when "strange things" happen at the circulation desk. Maybe insted of a FK we could just add an index? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18441 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|add primary, foreign keys |Add primary, foreign keys |to statistics table |to statistics table -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18441 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #2)
I think sometimes it's really useful that the entries are not all 'NULLed' on deletion of an item, borrower or staff user. Especially with our current 2 table setup. I often have to dig in statistics and action_logs when "strange things" happen at the circulation desk.
Maybe insted of a FK we could just add an index?
Never got a reply here. Marking WONTFIX, please re-open if you disagree. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18441 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- In this case I agree, I don't think I'd use a foreign key but I see no issue with adding indexes for performance. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org