I noticed a very slow performance on oai server koha version 3.22 !
In particular the query
SELECT biblioitems.biblionumber, biblioitems.timestamp, marcxml
FROM biblioitems JOIN oai_sets_biblios ON biblioitems.biblionumber = oai_sets_biblios.biblionumber
WHERE timestamp >= '1970-01-01 00:00:00' AND timestamp <= '2015-12-22 23:59:59' AND oai_sets_biblios.set_id = '4'
SELECT deletedbiblio.biblionumber, null as marcxml, timestamp
FROM deletedbiblio JOIN oai_sets_biblios ON deletedbiblio.biblionumber = oai_sets_biblios.biblionumber
WHERE DATE(timestamp) >= '1970-01-01T00:00:00Z' AND DATE(timestamp) <= '2015-12-22T23:59:59Z' AND oai_sets_biblios.set_id = '4'
ORDER BY biblionumber LIMIT 51 OFFSET 0
As constructed by oai.pl
Requires about a minute to get results for each fetch!
So according to my rough calculations
a 500K marcs catalogue would require about 6 days to be harvested!
Bug 15106 contains the solution. Especially, an index must be added to biblioitems/deletebiblioitems timestamp field:
KEY `timestamp_bibno` (`timestamp`, `biblionumber`)
You can confirm that this solution works for you by altering your DB schema:
ALTER TABLE biblioitems ADD KEY `timestamp_bibno` (`timestamp`, `biblionumber`);
ALTER TABLE deletedbiblioitems ADD KEY `timestamp_bibno` (`timestamp`, `biblionumber`)
(In reply to Frédéric Demians from comment #1)
> Bug 15106 contains the solution.
Must be a typo, bug 15106 is about batch patron modification.
Yes, sorry. It's bug 15108.
Can you confirm that 15108 would actually resolve this one?
(In reply to Marcel de Rooy from comment #4)
> Can you confirm that 15108 would actually resolve this one?
Yes. Even I haven't re-check recently.
Then please go sign it off!
*** This bug has been marked as a duplicate of bug 15108 ***