[Koha-devel] DB design (MARC structure)

Paul POULAIN paul.poulain at free.fr
Thu Jun 17 08:21:10 CEST 2004


Paul POULAIN a écrit :

> Joshua Ferraro a écrit :
>
>> If I understand it correctly this sounds like a great solution to
>> our speed issues with the current marc searching--and it won't 
>> compromise the accuracy of the search either.  Let's do it
>>
> ok, it's commited.
> works fine on a small DB.

works fine on your DB too :

EXPLAIN SELECT DISTINCT m1.bibid
FROM biblio, biblioitems, marc_biblio, marc_word AS m1
WHERE biblio.biblionumber = marc_biblio.biblionumber AND 
biblio.biblionumber = biblioitems.biblionumber AND m1.bibid = 
marc_biblio.bibid AND (
m1.word
LIKE 'wolf%' AND m1.tagsubfield
IN (
'245a'
)
)
ORDER BY biblio.title


table     type     possible_keys     key     key_len     ref     rows 
    Extra
m1     range     bibid,word,Marc_Search     Marc_Search     259     NULL 
    114     Using where; Using temporary; Using filesort
marc_biblio     eq_ref     PRIMARY,biblionumber     PRIMARY     8     
m1.bibid     1     Using where; Distinct
biblio     eq_ref     PRIMARY,blbnoidx     PRIMARY     4     
marc_biblio.biblionumber     1     Distinct
biblioitems     ref     bibnoidx     bibnoidx     4     
biblio.biblionumber     1     Using index; Distinct

we can't do better ;-)

NB : to have something working well :
* copy your 2.0 DB
* run updatedatabase.
(all indexes should be created. Be patient, 5-6 hours needed on your 
marc_word table)

-- 
Paul POULAIN
Consultant indépendant en logiciels libres
responsable francophone de koha (SIGB libre http://www.koha-fr.org)





More information about the Koha-devel mailing list