Summary: | C4/ShelfBrowser slow SQL performance | ||
---|---|---|---|
Product: | Koha | Reporter: | Dobrica Pavlinusic <dpavlin> |
Component: | Lists | Assignee: | Dobrica Pavlinusic <dpavlin> |
Status: | CLOSED FIXED | QA Contact: | Ian Walls <koha.sekjal> |
Severity: | normal | ||
Priority: | P5 - low | CC: | paul.poulain |
Version: | 3.6 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 7119, 7172 | ||
Attachments: |
Bug 7886 - C4/ShelfBrowser slow SQL performance
Bug 7886 - C4/ShelfBrowser slow SQL performance |
Description
Dobrica Pavlinusic
2012-04-03 12:52:33 UTC
Hi Dobrika, 2 points: * most of our (BibLibre) customers already have those indexes, for the reason you point. I thought it was in koha-community in fact... * hardware is so cheap that I don't think the size is really a problem (+ location not a long field, the index must not be that large) So, let's go for it, I remove the "in discussion" status, I don't think it really need a discussion ! I even think its more a bugfix than an ENH, so also upgrading severity ! I support adding these indexes. These codes are often-queried, and we'd get performance gains across the system for the cost of some disk space. I call that win Created attachment 8895 [details] [review] Bug 7886 - C4/ShelfBrowser slow SQL performance ShelfBrowser uses two SQL queries with syntax WHERE ((cn_sort = ? AND itemnumber < ?) OR cn_sort < ?) AND homebranch = ? AND location = ? AND ccode = ? homebranch already has index, and adding indexes on ccode and location improves performance by 30% for each query since MySQL is able to use index_merge intersect(items_ccode,homebranch,items_location) QA comment = dobrica, this patch is correct, but lack kohastructure.sql Sorry, this is my first database patch, I will fix that. Created attachment 8976 [details] [review] Bug 7886 - C4/ShelfBrowser slow SQL performance ShelfBrowser uses two SQL queries with syntax WHERE ((cn_sort = ? AND itemnumber < ?) OR cn_sort < ?) AND homebranch = ? AND location = ? AND ccode = ? homebranch already has index, and adding indexes on ccode and location improves performance by 30% for each query since MySQL is able to use index_merge intersect(items_ccode,homebranch,items_location) Signing off and Passing QA in one go, as this patch just adds indexes to essential fields, both for new and updating installs. This patch will appear in 3.6.5. |