Bugzilla – Attachment 5143 Details for
Bug 5866
At larger hold volume, waitingreserves.pl for all libraries times out, can cause generalized slowness
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5866 : Updated patch to speed up holds awaiting pickup
Bug-5866--Updated-patch-to-speed-up-holds-awaiting.patch (text/plain), 2.62 KB, created by
Chris Cormack
on 2011-08-25 03:21:59 UTC
(
hide
)
Description:
Bug 5866 : Updated patch to speed up holds awaiting pickup
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-08-25 03:21:59 UTC
Size:
2.62 KB
patch
obsolete
>From dcaa9c605f9af5ba183f21754cdc2d44a2fd213e Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Thu, 25 Aug 2011 15:21:01 +1200 >Subject: [PATCH] Bug 5866 : Updated patch to speed up holds awaiting pickup > >--- > circ/waitingreserves.pl | 3 +-- > installer/data/mysql/kohastructure.sql | 1 + > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > 3 files changed, 10 insertions(+), 2 deletions(-) > >diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl >index 9850114..c2f868d 100755 >--- a/circ/waitingreserves.pl >+++ b/circ/waitingreserves.pl >@@ -111,10 +111,9 @@ foreach my $num (@getreserves) { > my $gettitle = GetBiblioFromItemNumber( $num->{'itemnumber'} ); > # fix up item type for display > $gettitle->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $gettitle->{'itype'} : $gettitle->{'itemtype'}; >- my $getborrower = GetMemberDetails( $num->{'borrowernumber'} ); >+ my $getborrower = GetMember(borrowernumber => $num->{'borrowernumber'}); > my $itemtypeinfo = getitemtypeinfo( $gettitle->{'itemtype'} ); # using the fixed up itype/itemtype > $getreserv{'waitingdate'} = format_date( $num->{'waitingdate'} ); >- > my ( $waiting_year, $waiting_month, $waiting_day ) = split (/-/, $num->{'waitingdate'}); > ( $waiting_year, $waiting_month, $waiting_day ) = > Add_Delta_Days( $waiting_year, $waiting_month, $waiting_day, >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 8b84019..13fa53d 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1555,6 +1555,7 @@ CREATE TABLE `reserves` ( > `waitingdate` date default NULL, > `expirationdate` DATE DEFAULT NULL, > `lowestPriority` tinyint(1) NOT NULL, >+ KEY priorityfoundidx (priority,found), > KEY `borrowernumber` (`borrowernumber`), > KEY `biblionumber` (`biblionumber`), > KEY `itemnumber` (`itemnumber`), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 030897c..1085db9 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4432,6 +4432,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > >+$DBversion = "3.05.00.XXX"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("CREATE INDEX priorityfoundidx ON reserves (priority,found)"); >+ print "Create an index on reserves to speed up holds awaiting pickup report bug 5866\n"; >+ SetVersion($DBversion); >+} >+ >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >-- >1.7.4.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5866
:
5138
|
5143
|
5151