Suggestions table is missing some indexes.
Created attachment 38806 [details] [review] Bug 14132 - suggestions table is missing indexes Suggestions table is missing some indexes. Index on biblionumber will speed up C4::Suggestions::GetSuggestionInfoFromBiblionumber(), often called in a loop. Index on status and branchcode will speed up many queries. Note that an index on budgetid is automatically added by the creation of the foreign key constraint. Test plan : - Check performance with an invoice containing a lot of orders. - Check suggestions pages are faster or at least not slower.
Created attachment 38807 [details] [review] Bug 14132 - suggestions table is missing indexes - atomicupdate
Should this have the status "Needs sign-off"? For the second patch: Instead of ALTER TABLE `suggestions`... maybe better: ALTER IGNORE TABLE `suggestions`... http://wiki.koha-community.org/wiki/Database_updates
(In reply to Marc Véron from comment #3) > Should this have the status "Needs sign-off"? Indeed. I've used git bz without -e. > > For the second patch: > Instead of > ALTER TABLE `suggestions`... > maybe better: > ALTER IGNORE TABLE `suggestions`... > > http://wiki.koha-community.org/wiki/Database_updates Ok thanks. I did not knew that INGORE can be used with ALTER TABLE.
Created attachment 38841 [details] [review] Bug 14132 - suggestions table is missing indexes Suggestions table is missing some indexes. Index on biblionumber will speed up C4::Suggestions::GetSuggestionInfoFromBiblionumber(), often called in a loop. Index on status and branchcode will speed up many queries. Note that an index on budgetid is automatically added by the creation of the foreign key constraint. Test plan : - Check performance with an invoice containing a lot of orders. - Check suggestions pages are faster or at least not slower.
Created attachment 38842 [details] [review] Bug 14132 - suggestions table is missing indexes - atomicupdate
Ready for signoff. I've spitted each alter table in a unique line because if one key already exists the all line fails. If the key alreeady exists, it will still return an error even with ALTER IGNORE. Looks like the is only useful for unique keys.
Created attachment 38937 [details] [review] [SIGNED-OFF] Bug 14132: suggestions table is missing indexes Suggestions table is missing some indexes. Index on biblionumber will speed up C4::Suggestions::GetSuggestionInfoFromBiblionumber(), often called in a loop. Index on status and branchcode will speed up many queries. Note that an index on budgetid is automatically added by the creation of the foreign key constraint. Test plan : - Check performance with an invoice containing a lot of orders. - Check suggestions pages are faster or at least not slower. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 38938 [details] [review] [SIGNED-OFF] Bug 14132: suggestions table is missing indexes - atomicupdate Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Sorry but removed backticks No errors
Created attachment 38975 [details] [review] [PASSED QA] Bug 14132: suggestions table is missing indexes Suggestions table is missing some indexes. Index on biblionumber will speed up C4::Suggestions::GetSuggestionInfoFromBiblionumber(), often called in a loop. Index on status and branchcode will speed up many queries. Note that an index on budgetid is automatically added by the creation of the foreign key constraint. Test plan : - Check performance with an invoice containing a lot of orders. - Check suggestions pages are faster or at least not slower. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 38976 [details] [review] [PASSED QA] Bug 14132: suggestions table is missing indexes - atomicupdate Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Sorry but removed backticks No errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patches pushed to master. Thanks Frido!