[rt-users] Wrong schema?

Jaime Kikpole jkikpole at cairodurham.org
Wed Jan 26 13:50:00 EST 2005


	I was trying to look through my MySQL tables for things that didn't  
match rt3/etc/schema.mysql and found that I had a few "extra" indexes.   
Could these be a problem?  Details below, for the interested.

							Thanks in advance,
							Jaime

mysql> show index from Groups;
+--------+------------+----------+--------------+------------- 
+-----------+-------------+----------+--------+------+------------ 
+---------+
| Table  | Non_unique | Key_name | Seq_in_index | Column_name |  
Collation | Cardinality | Sub_part | Packed | Null | Index_type |  
Comment |
+--------+------------+----------+--------------+------------- 
+-----------+-------------+----------+--------+------+------------ 
+---------+
| Groups |          0 | PRIMARY  |            1 | id          | A        
   |       20973 |     NULL | NULL   |      | BTREE      |         |
| Groups |          1 | Groups1  |            1 | Domain      | A        
   |           4 |     NULL | NULL   | YES  | BTREE      |         |
| Groups |          1 | Groups1  |            2 | Instance    | A        
   |       20973 |     NULL | NULL   | YES  | BTREE      |         |
| Groups |          1 | Groups1  |            3 | Type        | A        
   |       20973 |     NULL | NULL   | YES  | BTREE      |         |
| Groups |          1 | Groups1  |            4 | id          | A        
   |       20973 |     NULL | NULL   |      | BTREE      |         |
| Groups |          1 | Groups2  |            1 | Type        | A        
   |           2 |     NULL | NULL   | YES  | BTREE      |         |
| Groups |          1 | Groups2  |            2 | Instance    | A        
   |       20973 |     NULL | NULL   | YES  | BTREE      |         |
| Groups |          1 | Groups2  |            3 | Domain      | A        
   |       20973 |     NULL | NULL   | YES  | BTREE      |         |
+--------+------------+----------+--------------+------------- 
+-----------+-------------+----------+--------+------+------------ 
+---------+
8 rows in set (0.05 sec)


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         |       41456 |     NULL | NULL   |      | BTREE      |  
         |
| CachedGroupMembers |          1 | DisGrouMem |            1 | GroupId  
     | A         |       41456 |     NULL | NULL   | YES  | BTREE      |  
         |
| CachedGroupMembers |          1 | DisGrouMem |            2 |  
MemberId    | A         |       41456 |     NULL | NULL   | YES  |  
BTREE      |         |
| CachedGroupMembers |          1 | DisGrouMem |            3 |  
Disabled    | A         |       41456 |     NULL | NULL   |      |  
BTREE      |         |
| CachedGroupMembers |          1 | GrouMem    |            1 | GroupId  
     | A         |       41456 |     NULL | NULL   | YES  | BTREE      |  
         |
| CachedGroupMembers |          1 | GrouMem    |            2 |  
MemberId    | A         |       41456 |     NULL | NULL   | YES  |  
BTREE      |         |
+--------------------+------------+------------+-------------- 
+-------------+-----------+-------------+----------+--------+------ 
+------------+---------+
6 rows in set (0.10 sec)


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 |          0 | PRIMARY  |            1 | id           | A        
   |         596 |     NULL | NULL   |      | BTREE      |         |
| Users |          0 | Users1   |            1 | Name         | A        
   |         596 |     NULL | NULL   |      | BTREE      |         |
| Users |          1 | Users2   |            1 | Name         | A        
   |         596 |     NULL | NULL   |      | BTREE      |         |
| Users |          1 | Users3   |            1 | id           | A        
   |         596 |     NULL | NULL   |      | BTREE      |         |
| Users |          1 | Users3   |            2 | EmailAddress | A        
   |         596 |     NULL | NULL   | YES  | BTREE      |         |
| Users |          1 | Users4   |            1 | EmailAddress | A        
   |         596 |     NULL | NULL   | YES  | BTREE      |         |
+-------+------------+----------+--------------+-------------- 
+-----------+-------------+----------+--------+------+------------ 
+---------+
6 rows in set (0.02 sec)


mysql> show index from Tickets;
+---------+------------+----------+--------------+------------- 
+-----------+-------------+----------+--------+------+------------ 
+---------+
| Table   | Non_unique | Key_name | Seq_in_index | Column_name |  
Collation | Cardinality | Sub_part | Packed | Null | Index_type |  
Comment |
+---------+------------+----------+--------------+------------- 
+-----------+-------------+----------+--------+------+------------ 
+---------+
| Tickets |          0 | PRIMARY  |            1 | id          | A       
    |        5168 |     NULL | NULL   |      | BTREE      |         |
| Tickets |          1 | Tickets1 |            1 | Queue       | A       
    |           9 |     NULL | NULL   |      | BTREE      |         |
| Tickets |          1 | Tickets1 |            2 | Status      | A       
    |          23 |     NULL | NULL   | YES  | BTREE      |         |
| Tickets |          1 | Tickets2 |            1 | Owner       | A       
    |          21 |     NULL | NULL   |      | BTREE      |         |
| Tickets |          1 | Tickets3 |            1 | EffectiveId | A       
    |        5168 |     NULL | NULL   |      | BTREE      |         |
| Tickets |          1 | Tickets4 |            1 | id          | A       
    |        5168 |     NULL | NULL   |      | BTREE      |         |
| Tickets |          1 | Tickets4 |            2 | Status      | A       
    |        5168 |     NULL | NULL   | YES  | BTREE      |         |
| Tickets |          1 | Tickets5 |            1 | id          | A       
    |        5168 |     NULL | NULL   |      | BTREE      |         |
| Tickets |          1 | Tickets5 |            2 | EffectiveId | A       
    |        5168 |     NULL | NULL   |      | BTREE      |         |
| Tickets |          1 | Tickets6 |            1 | EffectiveId | A       
    |        5168 |     NULL | NULL   |      | BTREE      |         |
| Tickets |          1 | Tickets6 |            2 | Type        | A       
    |        5168 |     NULL | NULL   | YES  | BTREE      |         |
+---------+------------+----------+--------------+------------- 
+-----------+-------------+----------+--------+------+------------ 
+---------+
11 rows in set (0.05 sec)


mysql> show index from TicketCustomFieldValues;
+-------------------------+------------+-------------------------- 
+--------------+-------------+-----------+-------------+---------- 
+--------+------+------------+---------+
| Table                   | Non_unique | Key_name                 |  
Seq_in_index | Column_name | Collation | Cardinality | Sub_part |  
Packed | Null | Index_type | Comment |
+-------------------------+------------+-------------------------- 
+--------------+-------------+-----------+-------------+---------- 
+--------+------+------------+---------+
| TicketCustomFieldValues |          0 | PRIMARY                  |      
        1 | id          | A         |        2446 |     NULL | NULL   |   
     | BTREE      |         |
| TicketCustomFieldValues |          1 | TicketCustomFieldValues1 |      
        1 | CustomField | A         |           5 |     NULL | NULL   |   
     | BTREE      |         |
| TicketCustomFieldValues |          1 | TicketCustomFieldValues1 |      
        2 | Ticket      | A         |        2446 |     NULL | NULL   |   
     | BTREE      |         |
| TicketCustomFieldValues |          1 | TicketCustomFieldValues1 |      
        3 | Content     | A         |        2446 |     NULL | NULL   |  
YES  | BTREE      |         |
| TicketCustomFieldValues |          1 | TicketCustomFieldValues2 |      
        1 | CustomField | A         |           1 |     NULL | NULL   |   
     | BTREE      |         |
| TicketCustomFieldValues |          1 | TicketCustomFieldValues2 |      
        2 | Ticket      | A         |        2446 |     NULL | NULL   |   
     | BTREE      |         |
+-------------------------+------------+-------------------------- 
+--------------+-------------+-----------+-------------+---------- 
+--------+------+------------+---------+
6 rows in set (0.05 sec)





More information about the rt-users mailing list