[Koha-devel] Other suggestions to clean DB...

paul POULAIN paul.poulain at free.fr
Tue Mar 5 13:07:18 CET 2002


Chris Cormack wrote:

>I've a few other suggestions to do :
>* The bibliosubject table has a no indexes. It would be useful,
>          imho, to put one on biblionumber, and one on subject, to speed
>          up searches. The problem is that subject is a text field
>          (BLOB), so can't be indexed. in the sample DB, there are only
>          3 record being more than 80car long. And they are, (again
>          imho) unuseable for searches :  WORLD WAR, 1939-1945 -
>          PRISONERS AND PRISONS, GERMAN - PERSONAL NARRATIVES, NEW
>          ZEALAND, for exampl. I had divided such a subject in 3 or 4
>          subjects. Do you agree to modify column type to car(80), and
>          putting an index ?
>
>You can actually index text fields (It is indexed in the hlt database in
>production) show index from bibliosubject;
>+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+---------+
>| Table         | Non_unique | Key_name | Seq_in_index | Column_name |
>Collation | Cardinality | Sub_part | Packed | Comment |
>+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+---------+
>| bibliosubject |          1 | subidx   |            1 | subject     |
>A         |       17111 |       15 | NULL   |         |
>+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+---------+
>
You're both right. I tried to index with phpmyadmin, who can't  create 
this :
CREATE INDEX test ON bibliosubtitle (subtitle(80))
If I create index in writing the create index, it works.
So, this problem is closed. we can keep text fields.
--
Paul






More information about the Koha-devel mailing list