[rt-users] "More about" box loads very slowly
Ruslan Zakirov
ruslan.zakirov at gmail.com
Mon Mar 8 08:32:21 EST 2010
Hello, David.
On Mon, Mar 8, 2010 at 3:55 PM, David X. Glover
<d.glover1 at physics.ox.ac.uk> wrote:
> On 8 Mar 2010, at 10:29, David X. Glover wrote:
[snip]
> mysql> SHOW INDEX FROM Users;
> +-------+------------+----------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+
> | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
> +-------+------------+----------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+
> | Users | 1 | Users2 | 1 | Name | A | 512 | NULL | NULL | | BTREE | |
> | Users | 1 | Users3 | 1 | id | A | 512 | NULL | NULL | YES | BTREE | |
> | Users | 1 | Users3 | 2 | EmailAddress | A | 512 | NULL | NULL | YES | BTREE | |
> | Users | 1 | Users4 | 1 | EmailAddress | A | 512 | NULL | NULL | YES | BTREE | |
> +-------+------------+----------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+
Create primary key on Users(id). Drop index Users3. As an option make
keys Users2 and Users4 unique.
> mysql> SHOW INDEX FROM CachedGroupMembers;
> +--------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
> | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
> +--------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
> | CachedGroupMembers | 0 | PRIMARY | 1 | id | A | 16498 | NULL | NULL | | BTREE | |
> +--------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
Create index on CachedGroupMembers(MemberId, GroupId, Disabled) and
reversed one CachedGroupMembers(GroupId, MemberId, Disabled).
Instructions on dropping indexes and creating new you can find in
mysql's documentation.
--
Best regards, Ruslan.
More information about the rt-users
mailing list