SQL Analyzer


Explain Extended

ID Select Type Table Access Type Possible Keys Used Key Key Length Ref Rows Examined Filtered Extra
1 SIMPLE gd_category ALL idx 3,575 83.24% Using where; Using filesort

Original SQL Statement

select 
  category, 
  catnm, 
  sort, 
  useimg, 
  level, 
  level_auth, 
  auth_step 
from 
  gd_category 
where 
  hidden = 0 
  and length(category)<= 6 
  and category <= '065' 
order by 
  category

Converted SQL Statement (MySQL Optimizer)

/* select#1 */
select 
  `pravs`.`gd_category`.`category` AS `category`, 
  `pravs`.`gd_category`.`catnm` AS `catnm`, 
  `pravs`.`gd_category`.`sort` AS `sort`, 
  `pravs`.`gd_category`.`useimg` AS `useimg`, 
  `pravs`.`gd_category`.`level` AS `level`, 
  `pravs`.`gd_category`.`level_auth` AS `level_auth`, 
  `pravs`.`gd_category`.`auth_step` AS `auth_step` 
from 
  `pravs`.`gd_category` 
where 
  (
    (
      `pravs`.`gd_category`.`hidden` = 0
    ) 
    and (
      length(
        `pravs`.`gd_category`.`category`
      ) <= 6
    ) 
    and (
      `pravs`.`gd_category`.`category` <= '065'
    )
  ) 
order by 
  `pravs`.`gd_category`.`category`