Hi all Hope everyones holidays are going well. I ended up taking a look at the keyword searching in koha the other day, it was running slow and was causing much consternation in the holiday rush. What was happening is because of the likes in the search and the wildcarding from the front of the search terms. Mysql couldnt use any indices to make the search faster. Which is fine until you have to join the biblio, biblioitems and bibliosubtitle tables together to search over. Which is what the keyword search needs. It meant that for the Horowhenua library's for every keyword entered mysql had to scan 160955 rows. Which isnt pretty when a few ppl are doing it at the same time with a few keywords. What I did was pretty much a quick bodge I ended up using Set::Scalar, and breaking the queries down into one per table, then using set unions to join the results together. As bodges go it worked nicely, searches that previously took 10+ seconds now take less than 1. But im hesistant to commit my change to cvs as I think that with steves work the database structure is going to change and the searches will need to be rewritten anyway. Plus it also means another module that ppl would have to install to get koha going. So if we can fix the broken database design, (putting subtitles as just a column in biblio would be one way to drop an unnessecary table for a start) and do the searches without the uses of Set::Scalar i think that would be far preferable. What do others think? Is it worth committing the change to the sourceforge cvs? Would anyone find it useful as a quick fix? If not ill just keep it in my local copy. Hope everyone is well and Happy new year Chris -- Chris Cormack Programmer 025 500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
participants (1)
-
Chris Cormack