WARNING: this commit changes the DB representation; you need to alter the
DB by hand after this commit
- h_position: varchar(255) -> varchar(62)
- h_sort: varchar(255) -> varchar(6)
- several indexes have been redesigned from scratch.
Motivation: MySql is not able to exploit two indexes (on columns c1 and c2)
in a query of type "select ... from table where c1 = x and c2 = y".
Only one of the two indexes is exploited; the other test is done on each line.
My commit introduces a single index on c1 AND c2 in place of two indexes.
WARNING: it is sure that a few queries (e.g. match) are greatly optimized by
this commit. On the contrary I ignore if the performance of other queries drops.
Moreover, I have not optimized yet the indexes over the hits and count tables.