Bug 7846 - get_batch_summary massive speedup
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 29 Mar 2012 13:39:17 +0000 (15:39 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 25 May 2012 15:47:14 +0000 (17:47 +0200)
commit5baa35ad3b33ec1cc0dea906fe369eb74366d131
tree2cddd61804b358dc4c3368a36138c7daa2df19d9
parent2f837bafee0d09a890171f4b0cd27efa5a0e3670
Bug 7846 - get_batch_summary massive speedup

current code is using DISTINCT and another SQL query which can be replaced with GROUP BY
for massive speedup. In our case, generating Manage Batches screen DBI time decreased
from 24.762 s to 0.147 s

Aside from correct usage of relational database, this change also cleans up code nicely.

This change removed semi-columns from SQL query which broke Manage Patron batches.

Test scenario:

1. open Manage Batches screen and take note of time needed to generate it
2. apply this patch
3. reload page and check page genration time

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Creators/Lib.pm