Hi devs,

I'm looking at the new indexes created automatically by XWiki now, and they
are different than the ones created using the CheckIndexes tool in  Admin
Tools.
First this can make people create doubled indexes which can slow down (a
little) writing but what I'm more concerned about is wether the new indexes
are good enough.

Looking at activitystream_events we have this

mysql> show indexes from activitystream_events;
+-----------------------+------------+-----------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+
| Table                 | Non_unique | Key_name        | Seq_in_index |
Column_name     | Collation | Cardinality | Sub_part | Packed | Null |
Index_type | Comment |
+-----------------------+------------+-----------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+

New one

| activitystream_events |          0 | PRIMARY         |            1 |
ase_eventid     | A         |        2753 |     NULL | NULL   |      |
BTREE      |         |
| activitystream_events |          1 | EVENT_TYPE      |            1 |
ase_type        | A         |           6 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | EVENT_PRIORITY  |            1 |
ase_priority    | A         |           2 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | EVENT_WIKI      |            1 |
ase_wiki        | A         |           8 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | EVENT_DATE      |            1 |
ase_date        | A         |        2753 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | EVENT_PAGE      |            1 |
ase_page        | A         |        1376 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | EVENT_USER      |            1 |
ase_user        | A         |           8 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | EVENT_SPACE     |            1 |
ase_space       | A         |          29 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | EVENT_STREAM    |            1 |
ase_stream      | A         |          33 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | EVENT_APP       |            1 |
ase_application | A         |           2 |     NULL | NULL   | YES  |
BTREE      |         |

Old ones

| activitystream_events |          1 | ase_requestid   |            1 |
ase_requestid   | A         |        1376 |      200 | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_stream      |            1 |
ase_stream      | A         |          35 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_priority    |            1 |
ase_priority    | A         |           2 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_type        |            1 |
ase_type        | A         |           6 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_application |            1 |
ase_application | A         |           2 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_user        |            1 |
ase_user        | A         |           8 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_wiki        |            1 |
ase_wiki        | A         |           8 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_space       |            1 |
ase_space       | A         |          29 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_page        |            1 |
ase_page        | A         |         917 |     NULL | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_param1      |            1 |
ase_param1      | A         |        1376 |      200 | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_param2      |            1 |
ase_param2      | A         |          44 |      200 | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_param3      |            1 |
ase_param3      | A         |           2 |      200 | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_param4      |            1 |
ase_param4      | A         |           2 |      200 | NULL   | YES  |
BTREE      |         |
| activitystream_events |          1 | ase_param5      |            1 |
ase_param5      | A         |           2 |      200 | NULL   | YES  |
BTREE      |         |
+-----------------------+------------+-----------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+
24 rows in set (0.01 sec)


The xwikiattrecyclebin has no new indexes, and I have had a case of
performance issue with the recyclebin because of indexes.

Who have worked on this and how has it been reviewed wether or not this was
enough ?

Ludovic


-- 
Ludovic Dubost
Founder and CEO
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to