Hello fellow developers,
I had a look at the index that we use in Curriki and one of them is suspicious to me.
As expected id and names are index keys for most table, that is correct.
However, one is suspect in several of the value tables: index on XWL_VALUE.
Do I understand correctly that this means these indexes is loaded into a btree (i.e. a
ram-representation) of all the strings of xwiki, e.g. all the documents page content??
This seems wrong to make an index for this.
But
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Database+Administration indeed
recommends that:
create index xwl_value on xwikilongs (xwl_value);
create index xwi_value on xwikiintegers (xwi_value);
create index xws_value on xwikistrings (xws_value);
create index xwl_value on xwikilargestrings (xwl_value(50));
So... can someone explain me why such indices are created?
Would it be to honour the MySQL-based user-search?
thanks in advance
Paul
mysql> show index from xwikilargestrings;
+-------------------+------------+--------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name |
Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-------------------+------------+--------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| xwikilargestrings | 0 | PRIMARY | 1 | XWL_ID | A
| 468592 | NULL | NULL | | BTREE | |
| xwikilargestrings | 0 | PRIMARY | 2 | XWL_NAME | A
| 937185 | NULL | NULL | | BTREE | |
| xwikilargestrings | 1 | idl_value | 1 | XWL_VALUE | A
| 312395 | 50 | NULL | YES | BTREE | |
| xwikilargestrings | 1 | FK6661970F283EE295 | 1 | XWL_ID | A
| 468592 | NULL | NULL | | BTREE | |
| xwikilargestrings | 1 | FK6661970F283EE295 | 2 | XWL_NAME | A
| 937185 | NULL | NULL | | BTREE | |
+-------------------+------------+--------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
5 rows in set (0.00 sec)