List:General Discussion« Previous MessageNext Message »
From:Graeme B. Davis Date:March 30 2000 6:32pm
Subject:Re: Indexing problem
View as plain text  
here is the describe of the table:

+--------------+-------------+------+-----+---------+-------+
| Field        | Type        | Null | Key | Default | Extra |
+--------------+-------------+------+-----+---------+-------+
| ticket       | varchar(15) |      | PRI |         |       |
| assignedto   | varchar(12) |      |     |         |       |
| submitter    | varchar(12) |      |     |         |       |
| status       | varchar(13) |      | MUL |         |       |
| account      | varchar(13) | YES  |     | NULL    |       |
| team         | varchar(20) |      | MUL |         |       |
| passedto     | varchar(20) | YES  |     | NULL    |       |
| category     | varchar(20) | YES  |     | NULL    |       |
| dueto        | varchar(40) | YES  |     | NULL    |       |
| medium       | varchar(20) | YES  |     | NULL    |       |
| created      | datetime    | YES  |     | NULL    |       |
| modified     | datetime    | YES  |     | NULL    |       |
| newtime      | datetime    | YES  |     | NULL    |       |
| assignedtime | datetime    | YES  |     | NULL    |       |
| closedtime   | datetime    | YES  |     | NULL    |       |
| reopenedtime | datetime    | YES  |     | NULL    |       |
| telcovendor  | varchar(30) | YES  |     | NULL    |       |
| telcoticket  | varchar(15) | YES  |     | NULL    |       |
| keywords     | varchar(35) | YES  |     | NULL    |       |
+--------------+-------------+------+-----+---------+-------+


----- Original Message -----
From: "Graeme B. Davis" <GraemeD@stripped>
To: "mysql" <mysql@stripped>
Sent: Thursday, March 30, 2000 1:27 PM
Subject: Indexing problem


> I have the following indexes on a table and I'm wondering why my query
isn't
> using the indexes I created?
>
> Any ideas?
>
> Thanks!
>
> graeme
>
> -------------------
>
> mysql> show index from remedy;
>
+--------+------------+------------------+--------------+-------------+----
-
> ------+-------------+----------+
> | Table  | Non_unique | Key_name         | Seq_in_index | Column_name |
> Collation | Cardinality | Sub_part |
>
+--------+------------+------------------+--------------+-------------+----
-
> ------+-------------+----------+
> | remedy |          1 | teamsubmitter    |            1 | team        | A
> |        NULL |        5 |
> | remedy |          1 | teamsubmitter    |            2 | submitter   | A
> |        NULL |     NULL |
> | remedy |          0 | k_ticket         |            1 | ticket      | A
> |      351611 |     NULL |
> | remedy |          1 | statusassignedto |            1 | status      | A
> |        NULL |     NULL |
> | remedy |          1 | statusassignedto |            2 | assignedto  | A
> |        NULL |     NULL |
>
+--------+------------+------------------+--------------+-------------+----
-
> ------+-------------+----------+
> 5 rows in set (0.01 sec)
>
> mysql> EXPLAIN SELECT ticket, status, assignedto FROM remedy WHERE
> assignedto='person' AND status!='Closed';
>
+--------+------+---------------+------+---------+------+--------+---------
-
> --+
> | table  | type | possible_keys | key  | key_len | ref  | rows   | Extra
> |
>
+--------+------+---------------+------+---------+------+--------+---------
-
> --+
> | remedy | ALL  | NULL          | NULL |    NULL | NULL | 351611 | where
> used |
>
+--------+------+---------------+------+---------+------+--------+---------
-
> --+
> 1 row in set (0.00 sec)
>
>
>
> --
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread32746@stripped
>
> To unsubscribe, send a message to:
>     <mysql-unsubscribe-GraemeD=uu.net@stripped>
>
>

Thread
Please help. Sql joins.Andrey Muratov30 Mar
  • Indexing problemGraeme B. Davis30 Mar
  • Re: Indexing problemGraeme B. Davis30 Mar
  • Re: Indexing problemJan Dvorak31 Mar
    • Re: Indexing problemAndreas Pardeike31 Mar
      • Re: Indexing problemJan Dvorak31 Mar
        • Re: Indexing problemAndreas Pardeike31 Mar
          • Re: Indexing problemJan Dvorak31 Mar