[Koha-bugs] [Bug 8329] New: GetLostItems in C4::Items.pm has a SELECT *
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jun 28 11:27:39 CEST 2012
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8329
Priority: P5 - low
Change sponsored?: ---
Bug ID: 8329
Assignee: gmcharlt at gmail.com
Summary: GetLostItems in C4::Items.pm has a SELECT *
Severity: major
Classification: Unclassified
OS: All
Reporter: mtompset at hotmail.com
Hardware: All
Status: NEW
Version: unspecified
Component: Reports
Product: Koha
my $query = "
SELECT *
FROM items
LEFT JOIN biblio ON (items.biblionumber = biblio.biblionumber)
LEFT JOIN biblioitems ON (items.biblionumber =
biblioitems.biblionumber)
LEFT JOIN authorised_values ON (items.itemlost =
authorised_values.authorised_value)
WHERE
authorised_values.category = 'LOST'
AND itemlost IS NOT NULL
AND itemlost <> 0
";
We're using 3.6.3, and I comfirmed this is in 3.6.6. This problem would only be
obvious if there are many lost items. It is a hellish query as we have 39,000+
"lost" items. We're in the midst of doing data entry/cleanup on a new system.
my $query = "
SELECT title, author, lib, itemlost, authorised_value, barcode,
datelastseen, price, replacementprice, homebranch,
itype, itemtype, holdingbranch, location, itemnotes,
items.biblionumber as biblionumber
FROM items
LEFT JOIN biblio ON (items.biblionumber = biblio.biblionumber)
LEFT JOIN biblioitems ON (items.biblionumber =
biblioitems.biblionumber)
LEFT JOIN authorised_values ON (items.itemlost =
authorised_values.authorised_value)
WHERE
authorised_values.category = 'LOST'
AND itemlost IS NOT NULL
AND itemlost <> 0
";
This is functional, though it can probably be trimmed. The SELECT * includes
XML and MARC fields which are sizable and eat system memory!
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list