]> git.koha-community.org Git - koha.git/commit
Bug 7886 - C4/ShelfBrowser slow SQL performance
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 4 Apr 2012 23:03:30 +0000 (01:03 +0200)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 24 May 2012 00:53:19 +0000 (20:53 -0400)
commit62739421430069bcf8c40328772092b02554fe6d
tree30f71f830e98b212ef6f418f23158393994ddb29
parentb924d9c80f1847db70122faad606ad2067544afe
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)

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl