List:General Discussion« Previous MessageNext Message »
From:Jay Pipes Date:March 5 2007 8:29pm
Subject:Re: help me optimize this "ALL"
View as plain text  
No, because you have no WHERE condition.

wangxu wrote:
> sql:
> 
> SELECT *                   
> FROM table_one INNER JOIN table_one table_one1 ON table_one1.column_one =
> table_one.column_two 
>                INNER JOIN table_one table_one2 ON table_one2.column_one =
> table_one.column_three 
> 
> 
> explain:
> 
> *************************** 1. row ***************************
>            id: 1
>   select_type: SIMPLE
>         table: table_one
>          type: ALL
> possible_keys: idx_column_two,idx_column_three               
>           key: NULL
>       key_len: NULL
>           ref: NULL
>          rows: 2037
>         Extra:
> *************************** 2. row ***************************
>            id: 1
>   select_type: SIMPLE
>         table: table_one1
>          type: ref
> possible_keys: idx_column_one
>           key: idx_column_one
>       key_len: 5
>           ref: table_one.column_two
>          rows: 1
>         Extra: Using where
> *************************** 3. row ***************************
>            id: 1
>   select_type: SIMPLE
>         table: table_one2
>          type: ref
> possible_keys: idx_column_one
>           key: idx_column_one
>       key_len: 5
>           ref: table_one.column_three
>          rows: 1
>         Extra: Using where
> 
> Can I optimize this "ALL" on table one?
> thanks!
> 
>  

Thread
help me optimize this "ALL"wangxu5 Mar
  • Re: help me optimize this "ALL"Jay Pipes5 Mar
  • Re: help me optimize this "ALL"wangxu6 Mar