]> 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:55:50 +0000 (20:55 -0400)
commit1f6cc04bff3065d2c719a14e8f8af624f64c8ba9
tree60dd8e4dd13da5d61947ce5fd7c3aa12134b6f94
parentc62520cb10ac035167c7ca2146c8858325e76113
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