AW: [Rt-devel] New index on groupmembers table

Ham MI-ID, Torsten Brumm torsten.brumm at Kuehne-Nagel.com
Wed Jul 4 02:36:50 EDT 2007


Hi Jesse, Joby,

just found at an older rt 3.6.0 installation, this index is already there:

mysql> show index from GroupMembers;
+--------------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table        | Non_unique | Key_name      | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+--------------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| GroupMembers |          0 | PRIMARY       |            1 | id          | A         |      193046 |     NULL | NULL   |      | BTREE      |         |
| GroupMembers |          0 | GroupMembers1 |            1 | GroupId     | A         |      193046 |     NULL | NULL   |      | BTREE      |         |
| GroupMembers |          0 | GroupMembers1 |            2 | MemberId    | A         |      193046 |     NULL | NULL   |      | BTREE      |         |
| GroupMembers |          0 | SHREDDER_GM1  |            1 | MemberId    | A         |         677 |     NULL | NULL   |      | BTREE      |         |
| GroupMembers |          0 | SHREDDER_GM1  |            2 | GroupId     | A         |      193046 |     NULL | NULL   |      | BTREE      |         |
| GroupMembers |          1 | GroupMembers2 |            1 | MemberId    | A         |        1569 |     NULL | NULL   |      | BTREE      |         |
+--------------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+

Torsten

-----Ursprüngliche Nachricht-----
Von: rt-devel-bounces at lists.bestpractical.com [mailto:rt-devel-bounces at lists.bestpractical.com] Im Auftrag von Jesse Vincent
Gesendet: Dienstag, 3. Juli 2007 18:32
An: Joby Walker
Cc: rt-devel at lists.bestpractical.com
Betreff: Re: [Rt-devel] New index on groupmembers table


On Jun 22, 2007, at 9:03 PM, Joby Walker wrote:

> I've noticed some significant improvement by adding the following  
> index:
>
> CREATE INDEX groupmembers1 on groupmembers (groupid, memberid);
>
> Currently the groupmembers table is not indexed (apart from the  
> PK), and
> there are several operations that make use of the groupmembers  
> table and
> not the cachedgroupmembers table.  For example (in the stock RT) on
> *every* page load RT checks to see if the currentuser is Privileged.
>
>

Thanks. I've created a ticket to investigate adding this for RT 3.8.

Best,
Jesse

> -- 
>
> Joby Walker
> C&C SSG, University of Washington
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/ 
> rt-devel
>



More information about the Rt-devel mailing list