List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:May 28 1999 4:58pm
Subject:Re: Help with EXPLAIN
View as plain text  
Bob Bowker wrote:
> 
> Good Morning --
> 
> I need help interpreting this EXPLAIN ... what is it really telling me?
> How can I optimize the table subcats to speed up this select?
> 
> Thanks --
> 
> Bob Bowker
> bowker@stripped
> 
> mysql> explain select products.* from products,subcats where
> products.Prodnum=subcats.Prodnum and subcats.AudioCat1 !=0 and
> products.Showit = 1 order by subcats.Audio limit 6,6;
> +----------+--------+---------------+---------+---------+-----------------+-
> -----+------------+
> | table    | type   | possible_keys | key     | key_len | ref             |
> rows | Extra      |
> +----------+--------+---------------+---------+---------+-----------------+-
> -----+------------+
> | subcats  | ALL    | PRIMARY       | NULL    |    NULL | NULL            |
>  301 | where used |
> | products | eq_ref | PRIMARY       | PRIMARY |      15 | subcats.Prodnum |
>    1 | where used |
> +----------+--------+---------------+---------+---------+-----------------+-
> -----+------------+
> 2 rows in set (0.17 sec)

Hi Bob

It tells you, that you don't have a KEY (AudioCat1,Prodnum) defined on table subcats.

Tschau
Christian

Thread
Help with EXPLAINBob Bowker27 May
  • Re: Help with EXPLAINChristian Mack28 May
  • Help with EXPLAINMichael Widenius2 Jun