Bug 9681: Add some indexes in database
authorPaul Poulain <paul.poulain@biblibre.com>
Mon, 6 May 2013 13:06:47 +0000 (15:06 +0200)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 8 May 2013 14:03:23 +0000 (10:03 -0400)
commit68ff49bb7d982737c41a225cd697b8fb60d0b4ab
treeebba52ced87ef72e5ecb3b3846cfe895feac8392
parent061f4a2f3444ee2cbdb0ffe661e9b75fffae27a9
Bug 9681: Add some indexes in database

Some table columns should have an index to speed SQL queries :
- statistics table has only one index (used to make heavy queries for reports)
- itemtype should have an index in items and biblioitems (this is used in circulation to check the number of existing issues of a specific item type)
- issue.branchcode and issue.issuingbranch

Test plan :
- Create a new database using kohastructure.pl
=> check there is no SQL error and that new indexes are present (mysql> show create table)
Apply update database on a master version
=> check there is no SQL error and that new indexes are present (mysql> show create table)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Indexes created as described. No errors.
Fixing small merge conflict.
Test presence of new indexes on all affected tables.

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