AW: [Rt-devel] New index on groupmembers table
Jesse Vincent
jesse at bestpractical.com
Wed Jul 4 06:52:46 EDT 2007
On Jul 4, 2007, at 8:36 AM, Ham MI-ID, Torsten Brumm wrote:
> Hi Jesse, Joby,
>
> just found at an older rt 3.6.0 installation, this index is already
> there:
>
CREATE UNIQUE INDEX GroupMembers1 on GroupMembers (GroupId, MemberId);
Indeed it is.
Thanks,
Jesse
> 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
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20070704/8703692d/PGP.pgp
More information about the Rt-devel
mailing list