Created attachment 8686 [details] [review] 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. 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
Created attachment 8739 [details] [review] Bug 7864: Reintroduce list of subscribers to a serial alert message Adds a link to the existing template from the serial detail page: Patron alert with: RLIST (subscribers)
Comment on attachment 8739 [details] [review] Bug 7864: Reintroduce list of subscribers to a serial alert message Wrong bug
Created attachment 8742 [details] [review] Bug 7846: Little changes to the display Changes the display of subscribers a bit. - Makes each name a link to the patron account instead of having a separate 'View' link behind each name - Show the title and subscrption number as link to the subscription detail page instead of just 'subscription'
Comment on attachment 8742 [details] [review] Bug 7846: Little changes to the display Wrong bug again, sorry.
I'm still hoping for signoff :-)
If Katrin stops putting every other patch here I'll be able to sign off :) (Now I have to hide from Katrin).
Created attachment 9000 [details] [review] 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. 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>
Works as advertised, with the advertised speed increase
Saves us from running numerous extra queries in a loop of indefinite size. Good catch! Marking as Passed QA.
yikes: on my sample database there is no patch at all and = * without the patch the page /cgi-bin/koha/patroncards/manage.pl?card_element=batch load smoothly * with the patch I get a nasty: Can't use string ("-1") as an ARRAY ref while "strict refs" in use at /home/paul/koha.dev/koha-community/C4/Creators/Lib.pm line 518. Failed QA sorry !
Good catch. I missed semi-column ; which are embedded at end of query if there is filter parameter. Semi-columns are not needed, so I removed them.
Created attachment 9174 [details] [review] 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. 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
Created attachment 9175 [details] [review] 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
Created attachment 9545 [details] [review] 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>
Same content as the patch I Passed QA before, but now with the semi-colon issue fixed. Marking Passed once again.
My test database does not have batches, so I can test, but I trust the author. Report any problem !
There have been no further reports of problems so I am marking this bug resolved.